qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH v4 31/57] tcg/sparc64: Rename tcg_out_movi_imm13 to tcg_out_m


From: Peter Maydell
Subject: Re: [PATCH v4 31/57] tcg/sparc64: Rename tcg_out_movi_imm13 to tcg_out_movi_s13
Date: Fri, 5 May 2023 13:20:44 +0100

On Wed, 3 May 2023 at 08:12, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Emphasize that the constant is signed.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  tcg/sparc64/tcg-target.c.inc | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)

Commit message says we're just doing a rename, but...

> @@ -425,15 +425,15 @@ static void tcg_out_movi_int(TCGContext *s, TCGType 
> type, TCGReg ret,
>      tcg_target_long hi, lo = (int32_t)arg;
>      tcg_target_long test, lsb;
>
> -    /* A 32-bit constant, or 32-bit zero-extended to 64-bits.  */
> -    if (type == TCG_TYPE_I32 || arg == (uint32_t)arg) {
> -        tcg_out_movi_imm32(s, ret, arg);
> +    /* A 13-bit constant sign-extended to 64-bits.  */
> +    if (check_fit_tl(arg, 13)) {
> +        tcg_out_movi_s13(s, ret, arg);
>          return;
>      }
>
> -    /* A 13-bit constant sign-extended to 64-bits.  */
> -    if (check_fit_tl(arg, 13)) {
> -        tcg_out_movi_imm13(s, ret, arg);
> +    /* A 32-bit constant, or 32-bit zero-extended to 64-bits.  */
> +    if (type == TCG_TYPE_I32 || arg == (uint32_t)arg) {
> +        tcg_out_movi_imm32(s, ret, arg);
>          return;
>      }

...the commit has other code changes. Should these be in some
other patch ?

thanks
-- PMM



reply via email to

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