qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v2 18/44] target/loongarch: Implement vsat


From: Richard Henderson
Subject: Re: [RFC PATCH v2 18/44] target/loongarch: Implement vsat
Date: Mon, 3 Apr 2023 13:13:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 4/3/23 05:55, gaosong wrote:
Hi, Richard

在 2023/4/1 下午1:03, Richard Henderson 写道:
On 3/27/23 20:06, Song Gao wrote:
+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);
For the signed  version use ll?
I think use MAKE_64BIT_MASK(0, imm -1 )  for the signed version is not suitable.

int64_t max = MAKE_64BIT_MASK(0, imm);
int64_t min = ~max // or -1 - max





reply via email to

[Prev in Thread] Current Thread [Next in Thread]