qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH] tcg/ppc/tcg-target.c.inc: Fix tcg_out_rlw_rc


From: Richard Henderson
Subject: Re: [PATCH] tcg/ppc/tcg-target.c.inc: Fix tcg_out_rlw_rc
Date: Tue, 22 Oct 2024 11:19:50 -0700
User-agent: Mozilla Thunderbird

On 10/22/24 06:34, Dani Szebenyi wrote:
The previous message I sent was corrupted, sending again.

The TCG IR sequence:
mov_i32 tmp97,$0xc4240000                dead: 1  pref=0xffffffff
mov_i32 tmp98,$0x0                       pref=0xffffffff
rotr_i32 tmp97,tmp97,tmp98               dead: 1 2  pref=0xffffffff

was translated to `slwi r15, r14, 0` instead of `slwi   r14, r14, 0` due to SH 
field overflow.

SH field is 5 bits, and tcg_out_rlw is called in some situations with `32-n`, 
when `n` is 0 it results in an overflow to RA field.

This commit prevents overflow of that field and adds debug assertions for the 
other fields

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Dani Szebenyi <szedani@linux.ibm.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

and queued.


r~



reply via email to

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