qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/2] tcg: Fix branch/label link during plugin expansion


From: Richard Henderson
Subject: Re: [PATCH 0/2] tcg: Fix branch/label link during plugin expansion
Date: Tue, 10 Sep 2024 14:28:15 -0700
User-agent: Mozilla Thunderbird

On 9/10/24 14:23, Richard Henderson wrote:
With tcg_last_op(), we always get the last op of the stream.
With TCGContext.emit_before_op, the most recently emitted op
is no longer the last op.

Instead, pass the op being emitted back from the allocator so
that we can link it to the label without needing to look it up.

Oh, I meant to point out from whence this comes.
The plugin uses a conditional

 ld_i32 tmp18,env,$0xffffffffffffdb10
 mul_i32 tmp18,tmp18,$0x18
 ext_i32_i64 tmp17,tmp18
 add_i64 tmp17,tmp17,$0x575410edadc8
 ld_i64 tmp21,tmp17,$0x0
 brcond_i64 tmp21,$0x0,ltu,$L1
 ld_i32 tmp18,env,$0xffffffffffffdb10
 call plugin(0x79a2abfde66a),$0x1,$0,tmp18,$0x0
 set_label $L1

Note that the branch is X < 0 (unsigned), which is always false, and thus the branch is optimized away.


r~



reply via email to

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