|
From: | gaosong |
Subject: | Re: [RFC PATCH v2 18/44] target/loongarch: Implement vsat |
Date: | Mon, 3 Apr 2023 20:55:05 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
Hi, Richard
On 3/27/23 20:06, Song Gao wrote:For the signed version use ll?
+static void gen_vsat_s(unsigned vece, TCGv_vec t, TCGv_vec a, int64_t imm)
+{
+ TCGv_vec t1;
+ int64_t max = (1l << imm) - 1;
This needed 1ull, but better to just use
max = MAKE_64BIT_MASK(0, imm - 1);
e.g imm is 1,
imm is 1
This is RISU test log:
......
imm is d
1ll << imm -1 1fff
1ull << imm -1 1fff
MAKE_64BIT_MASK fff
imm is 8
1ll << imm -1 ff
1ull << imm -1 ff
MAKE_64BIT_MASK 7f
imm is 7
1ll << imm -1 7f
1ull << imm -1 7f
MAKE_64BIT_MASK 3f
imm is 1d
1ll << imm -1 1fffffff
1ull << imm -1 1fffffff
MAKE_64BIT_MASK fffffff
imm is 29
1ll << imm -1 1ffffffffff
1ull << imm -1 1ffffffffff
MAKE_64BIT_MASK ffffffffff
imm is 6
1ll << imm -1 3f
1ull << imm -1 3f
MAKE_64BIT_MASK 1f
imm is 3
1ll << imm -1 7
1ull << imm -1 7
MAKE_64BIT_MASK 3
imm is 1
1ll << imm -1 1
1ull << imm -1 1
MAKE_64BIT_MASK ffffffffffffffff
Mismatch reg after 63 checkpoints
......
mismatch detail (master : apprentice):
f22 : 0000000000000000 vs ffffffffffffffff
v22 : {0000000000000000, 0000000000000000} vs
{ffffffffffffffff, ffffffffffffffff}
[Prev in Thread] | Current Thread | [Next in Thread] |