aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/x86-interrupt_cld.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/x86-interrupt_cld.ll')
-rw-r--r--test/CodeGen/X86/x86-interrupt_cld.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/x86-interrupt_cld.ll b/test/CodeGen/X86/x86-interrupt_cld.ll
new file mode 100644
index 000000000000..bbb109eb633e
--- /dev/null
+++ b/test/CodeGen/X86/x86-interrupt_cld.ll
@@ -0,0 +1,17 @@
+; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Checks that interrupt handler code calls cld before calling an external
+;; function.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; CHECK: cld
+; CHECK: call
+
+define x86_intrcc void @foo(i8* %frame) {
+ call void @bar()
+ ret void
+}
+
+declare void @bar()
+