From: Bill Wendling Date: Mon, 12 Nov 2012 21:13:35 +0000 (+0000) Subject: Update testcase to show that we don't emit an error for sizes <= 32-bits. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba541d36f6891892efc3f17773ff2395bb97df44;p=clang Update testcase to show that we don't emit an error for sizes <= 32-bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167748 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/x86_32-inline-asm.c b/test/CodeGen/x86_32-inline-asm.c index 0596ba4307..7b342a6a26 100644 --- a/test/CodeGen/x86_32-inline-asm.c +++ b/test/CodeGen/x86_32-inline-asm.c @@ -8,6 +8,7 @@ typedef unsigned long long u_int64_t; typedef u_int64_t uint64_t; int main () { + // Error out if size is > 32-bits. uint32_t msr = 0x8b; uint64_t val = 0; __asm__ volatile("wrmsr" @@ -15,4 +16,9 @@ int main () { : "c" (msr), "a" ((val & 0xFFFFFFFFUL)), // expected-error {{invalid input size for constraint 'a'}} "d" (((val >> 32) & 0xFFFFFFFFUL))); + + // Don't error out if the size of the destination is <= 32 bits. + unsigned char data; + unsigned int port; + __asm__ volatile("outb %0, %w1" : : "a" (data), "Nd" (port)); // No error expected. }