|
From: | gaosong |
Subject: | Re: [PATCH v6 51/57] target/loongarch: Implement xvinsgr2vr xvpickve2gr |
Date: | Thu, 14 Sep 2023 16:25:13 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
在 2023/9/14 上午11:02, Richard Henderson 写道:
On 9/13/23 19:26, Song Gao wrote:+static inline int vec_reg_offset(int regno, int index, MemOp mop) +{ + const uint8_t size = 1 << mop; + int offs = index * size; + +#if HOST_BIG_ENDIAN + if (size < 8 ) { + offs ^ = (8 - size); + } +#endif + return offs + vec_full_offset(regno); +}Merge the #if into the if: if (HOST_BIG_ENDIAN && size < 8)
Got it. Thanks. Song Gao
[Prev in Thread] | Current Thread | [Next in Thread] |