qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/5] tci: Use 32-bit signed offsets to loads/sto


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 1/5] tci: Use 32-bit signed offsets to loads/stores
Date: Thu, 28 Mar 2013 08:56:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

On 03/28/2013 08:45 AM, Stefan Weil wrote:
>> > -            t2 = tci_read_i32(&tb_ptr);
>> > +            t2 = tci_read_s32(&tb_ptr);
> I'm afraid that old and new generated code are identical,
> because t2 is an unsigned tcg_target_ulong.

No it's not, because s32 is sign-extended from int32_t to tcg_target_ulong.

If you're thinking of the later arithmetic in type tcg_target_ulong, that's
fine.  Just so long as the sign-extension happened first.


r~



reply via email to

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