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

Eli Friedman eli.friedman at gmail.com
Sat Aug 29 16:41:45 PDT 2009


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.

-Eli



More information about the llvm-commits mailing list