[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 29/44] target/loongarch: Implement vssrlrn vssrarn
From: |
Richard Henderson |
Subject: |
Re: [RFC PATCH v2 29/44] target/loongarch: Implement vssrlrn vssrarn |
Date: |
Sat, 1 Apr 2023 20:31:38 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 |
On 3/27/23 20:06, Song Gao wrote:
+#define SSRLRNS(E1, E2, T1, T2, T3) \
+static T1 do_ssrlrns_ ## E1(T2 e2, int sa, int sh) \
+{ \
+ T1 shft_res; \
+ \
+ shft_res = do_vsrlr_ ## E2(e2, sa); \
+ T1 mask; \
+ mask = (1ul << sh) -1; \
I've probably missed other instances in review, but "ul" and "l" are *always*
incorrect.
For 32-bit hosts, this is not wide enough.
If it were, "u" or no suffix would have been sufficient.
For uses like this, MAKE_64BIT_MASK(0, sh) is what you want.
For other kinds of uses, "ull" or "ll" is correct.
r~
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [RFC PATCH v2 29/44] target/loongarch: Implement vssrlrn vssrarn,
Richard Henderson <=