[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations.
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations. |
Date: |
Thu, 26 May 2011 23:25:43 +0300 |
On Thu, May 26, 2011 at 11:10 PM, Richard Henderson <address@hidden> wrote:
> On 05/26/2011 12:14 PM, Blue Swirl wrote:
>> On Thu, May 26, 2011 at 4:56 PM, Richard Henderson <address@hidden> wrote:
>>> On 05/26/2011 05:36 AM, Kirill Batuzov wrote:
>>>>> x = (int32_t)x >> (int32_t)y;
>>>>>
>>>> This expression has an implementation-defined behavior accroding to
>>>> C99 6.5.7 so we decided to emulate signed shifts by hand.
>>>
>>> Technically, yes. In practice, no. GCC, ICC, LLVM, MSVC all know
>>> what the user wants here and will implement it "properly".
>>
>> Can't this be probed by configure? Then a wrapper could be introduced
>> for signed shifts.
>
> I don't see the point. The C99 implementation defined escape hatch
> exists for weird cpus. Which we won't be supporting as a QEMU host.
Maybe not, but a compiler with this property could arrive. For
example, GCC developers could decide that since this weirdness is
allowed by the standard, it may be implemented as well.
- Re: [Qemu-devel] [PATCH 1/6] Add TCG optimizations stub, (continued)
- [Qemu-devel] [PATCH 6/6] Do constant folding for unary operations., Kirill Batuzov, 2011/05/20
- [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Kirill Batuzov, 2011/05/20
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Richard Henderson, 2011/05/20
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Kirill Batuzov, 2011/05/26
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Richard Henderson, 2011/05/26
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Blue Swirl, 2011/05/26
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Richard Henderson, 2011/05/26
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations.,
Blue Swirl <=
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Richard Henderson, 2011/05/26
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Jamie Lokier, 2011/05/27
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Blue Swirl, 2011/05/27
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Richard Henderson, 2011/05/27
- Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations., Paolo Bonzini, 2011/05/27
[Qemu-devel] [PATCH 2/6] Add copy and constant propagation., Kirill Batuzov, 2011/05/20
[Qemu-devel] [PATCH 4/6] Do constant folding for boolean operations., Kirill Batuzov, 2011/05/20