summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-12-17 18:08:19 +0000
committerDuncan Sands <baldrick@free.fr>2007-12-17 18:08:19 +0000
commitfd7b326bea39c077eea8d378156bcf09051cc4ec (patch)
tree7eb74d7e82001116dae6ed86f61dd713c088a94f /test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
parent9dfb11d32d302abfe8803d530138b38ddc567c60 (diff)
downloadllvm-fd7b326bea39c077eea8d378156bcf09051cc4ec.tar.gz
llvm-fd7b326bea39c077eea8d378156bcf09051cc4ec.tar.bz2
llvm-fd7b326bea39c077eea8d378156bcf09051cc4ec.tar.xz
Make invokes of inline asm legal. Teach codegen
how to lower them (with no attempt made to be efficient, since they should only occur for unoptimized code). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic/2007-12-17-InvokeAsm.ll')
-rw-r--r--test/CodeGen/Generic/2007-12-17-InvokeAsm.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll b/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
new file mode 100644
index 0000000000..98871d0e3a
--- /dev/null
+++ b/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -enable-eh
+
+target triple = "i686-pc-linux-gnu"
+
+define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() {
+entry:
+ invoke void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null )
+ to label %.noexc unwind label %cleanup144
+
+.noexc: ; preds = %entry
+ ret void
+
+cleanup144: ; preds = %entry
+ unwind
+}