summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/x86-interrupt_cld.ll
diff options
context:
space:
mode:
authorAmjad Aboud <amjad.aboud@intel.com>2016-05-13 12:46:57 +0000
committerAmjad Aboud <amjad.aboud@intel.com>2016-05-13 12:46:57 +0000
commit78b1fb01466818fd1296cd32805d4ecf1655fef8 (patch)
treefaa8fa17c68e1e3a7e64ad3eb4ec897753386497 /llvm/test/CodeGen/X86/x86-interrupt_cld.ll
parentfc1186510b79c0dbc4ff521fcb37f6c83e564c71 (diff)
downloadbcm5719-llvm-78b1fb01466818fd1296cd32805d4ecf1655fef8.tar.gz
bcm5719-llvm-78b1fb01466818fd1296cd32805d4ecf1655fef8.zip
Assure calling "cld" instruction in prologue of X86 interrupt handler function.
Differential Revision: http://reviews.llvm.org/D18725 llvm-svn: 269413
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