qemu-devel
[Top][All Lists]
Advanced

[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: Fri, 27 May 2011 20:07:01 +0300

On Fri, May 27, 2011 at 12:14 AM, Richard Henderson <address@hidden> wrote:
> On 05/26/2011 01:25 PM, Blue Swirl wrote:
>>> 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.
>
> If you like, you can write a configure test for it.  But, honestly,
> essentially every place in qemu that uses shifts on signed types
> would have to be audited.  Really.

OK.

> The C99 hook exists to efficiently support targets that don't have
> arithmetic shift operations.  Honestly.

So it would be impossible for a compiler developer to change the logic
for shifts for some supported two's-complement logic CPUs (like x86)
just because it's legal?



reply via email to

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