From 78b1fb01466818fd1296cd32805d4ecf1655fef8 Mon Sep 17 00:00:00 2001 From: Amjad Aboud Date: Fri, 13 May 2016 12:46:57 +0000 Subject: Assure calling "cld" instruction in prologue of X86 interrupt handler function. Differential Revision: http://reviews.llvm.org/D18725 llvm-svn: 269413 --- llvm/test/CodeGen/X86/x86-interrupt_cld.ll | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 llvm/test/CodeGen/X86/x86-interrupt_cld.ll (limited to 'llvm/test/CodeGen') 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() + -- cgit v1.2.3