diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-11-12 21:13:35 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-11-12 21:13:35 +0000 |
commit | ba541d36f6891892efc3f17773ff2395bb97df44 (patch) | |
tree | 718c266e8b0fdf687cdaf64f05ff1d215f8fc7bd | |
parent | b0afe833e41cac21ded36a4d98df502fa5b3d758 (diff) |
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
-rw-r--r-- | test/CodeGen/x86_32-inline-asm.c | 6 |
1 files changed, 6 insertions, 0 deletions
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. } |