aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC/LeonFixCALLPassUT.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/SPARC/LeonFixCALLPassUT.ll')
-rw-r--r--test/CodeGen/SPARC/LeonFixCALLPassUT.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/LeonFixCALLPassUT.ll b/test/CodeGen/SPARC/LeonFixCALLPassUT.ll
new file mode 100644
index 000000000000..697590be4066
--- /dev/null
+++ b/test/CodeGen/SPARC/LeonFixCALLPassUT.ll
@@ -0,0 +1,20 @@
+; RUN: llc %s -O0 -march=sparc -mcpu=at697e -o - | FileCheck %s -check-prefix=FIXCALL
+; RUN: llc %s -O0 -march=sparc -mcpu=leon2 -mattr=+fixcall -o - | FileCheck %s -check-prefix=FIXCALL
+
+; RUN: llc %s -O0 -march=sparc -mcpu=at697e -mattr=-fixcall -o - | FileCheck %s -check-prefix=NO_FIXCALL
+; RUN: llc %s -O0 -march=sparc -mcpu=leon2 -o - | FileCheck %s -check-prefix=NO_FIXCALL
+
+
+; FIXCALL-LABEL: immediate_call_test
+; FIXCALL: call 763288
+
+; NO_FIXCALL-LABEL: immediate_call_test
+; NO_FIXCALL: call 2047583640
+define void @immediate_call_test() nounwind {
+entry:
+ call void asm sideeffect "call $0", "i"(i32 2047583640) nounwind
+ ret void
+}
+
+
+