aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-07-17 22:13:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-07-17 22:13:25 +0000
commit47e9fab1584a3fc9311fdecdbb87124e0a0b39e8 (patch)
tree48fad3fb8c68e73a61589eeb520e3c0ca6324d46 /test
parent12c67fbf2a49145f332a12fbb32441310d322088 (diff)
downloadexternal_llvm-47e9fab1584a3fc9311fdecdbb87124e0a0b39e8.zip
external_llvm-47e9fab1584a3fc9311fdecdbb87124e0a0b39e8.tar.gz
external_llvm-47e9fab1584a3fc9311fdecdbb87124e0a0b39e8.tar.bz2
Fix x86 inline ams 'q' constraint support. In 32-bit mode, it's just like 'Q', i.e. EAX, EDX, ECX, EBX. In 64-bit mode, it just means all the i64r registers. Yeah, that makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/inline-asm-q-regs.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/inline-asm-q-regs.ll b/test/CodeGen/X86/inline-asm-q-regs.ll
new file mode 100644
index 0000000..19df81b
--- /dev/null
+++ b/test/CodeGen/X86/inline-asm-q-regs.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -march=x86-64
+; rdar://7066579
+
+ type { i64, i64, i64, i64, i64 } ; type %0
+
+define void @t() nounwind {
+entry:
+ %asmtmp = call %0 asm sideeffect "mov %cr0, $0 \0Amov %cr2, $1 \0Amov %cr3, $2 \0Amov %cr4, $3 \0Amov %cr8, $0 \0A", "=q,=q,=q,=q,=q,~{dirflag},~{fpsr},~{flags}"() nounwind ; <%0> [#uses=0]
+ ret void
+}