[llvm-commits] [llvm-gcc-4.2] r80449 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Chris Lattner clattner at apple.com
Sat Aug 29 17:15:40 PDT 2009


On Aug 29, 2009, at 4:41 PM, Eli Friedman wrote:

> On Sat, Aug 29, 2009 at 4:31 PM, Dan Gohman<gohman at apple.com> wrote:
>> Author: djg
>> Date: Sat Aug 29 18:31:56 2009
>> New Revision: 80449
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=80449&view=rev
>> Log:
>> Support inline asm matching constraints where the input operand
>> is wider than the output operand. This is done by truncating the
>> input down to the narrower type, which appears to be consistent
>> with what GCC does.
>
> No, this isn't consistent with what gcc does.  Take the following  
> example:
>
> int a() {
>  char c;
>  asm ("sarl $10, %%eax" : "=a"(c) : "0"(1000000));
> }
>
> gcc does not truncate the input.

Right, if you want to support this, it is best to do something similar  
to what clang does.

-Chris



More information about the llvm-commits mailing list