summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/x86-interrupt_cld.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/x86-interrupt_cld.ll')
-rw-r--r--llvm/test/CodeGen/X86/x86-interrupt_cld.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/x86-interrupt_cld.ll b/llvm/test/CodeGen/X86/x86-interrupt_cld.ll
new file mode 100644
index 00000000000..bbb109eb633
--- /dev/null
+++ b/llvm/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()
+
OpenPOWER on IntegriCloud