在 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