[cfe-commits] r167717 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp lib/Sema/SemaStmtAsm.cpp test/CodeGen/x86_32-inline-asm.c

Bill Wendling isanbard at gmail.com
Mon Nov 12 10:54:03 PST 2012


Yeah. I thought about that last night, but while I was in bed. This should be fixed now.

-bw

On Nov 12, 2012, at 5:01 AM, Dimitry Andric <dimitry at andric.com> wrote:

> On 2012-11-12 10:49, Eli Friedman wrote:
>> On Sun, Nov 11, 2012 at 10:42 PM, Bill Wendling <isanbard at gmail.com> wrote:
>>> Author: void
>>> Date: Mon Nov 12 00:42:51 2012
>>> New Revision: 167717
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=167717&view=rev
>>> Log:
>>> Check that the input size is correct for the given constraint.
>>> 
>>> The 'a', 'c', and 'd' constraints on i386 mean a 32-bit register.
>> 
>> This is not completely true.  It could also mean an 8-bit register or
>> a 16-bit register.
> 
> Indeed, on our FreeBSD buildbot we're now getting errors:
> 
>  In file included from /data/buildslave/freebsd-clang-amd64/src-freebsd/sys/boot/ficl/i386/sysdep.c:18:
>  ./machine/cpufunc.h:266:43: error: invalid input size for constraint 'a'
>          __asm __volatile("outb %0, %w1" : : "a" (data), "Nd" (port));
>                                                   ^
> 
> on this inline function (u_int and u_char are just aliases for unsigned
> int and unsigned char):
> 
>  static __inline void
>  outb(u_int port, u_char data)
>  {
>          __asm __volatile("outb %0, %w1" : : "a" (data), "Nd" (port));
>  }




More information about the cfe-commits mailing list