From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/CodeGen/asm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/CodeGen/asm.c') diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c index 5077028..eb11285 100644 --- a/test/CodeGen/asm.c +++ b/test/CodeGen/asm.c @@ -168,3 +168,25 @@ float t21(long double x) { // CHECK: call x86_fp80 asm sideeffect "frndint" // CHECK-NEXT: fptrunc x86_fp80 {{.*}} to float } + +// - accept 'l' constraint +unsigned char t22(unsigned char a, unsigned char b) { + unsigned int la = a; + unsigned int lb = b; + unsigned int bigres; + unsigned char res; + __asm__ ("0:\n1:\n" : [bigres] "=la"(bigres) : [la] "0"(la), [lb] "c"(lb) : + "edx", "cc"); + res = bigres; + return res; +} + +// - accept 'l' constraint +unsigned char t23(unsigned char a, unsigned char b) { + unsigned int la = a; + unsigned int lb = b; + unsigned char res; + __asm__ ("0:\n1:\n" : [res] "=la"(res) : [la] "0"(la), [lb] "c"(lb) : + "edx", "cc"); + return res; +} -- cgit v1.1