aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-02-02 04:07:35 +0000
committerReed Kotler <rkotler@mips.com>2013-02-02 04:07:35 +0000
commit63f331235513a6f562ab4b2809b497c518b132e9 (patch)
tree6650d7fccd3fcff321a2e2d445c3f4476953564d /test/CodeGen/Mips
parenta0bbe40380d085b51b7b44b3eb60cc12bc619dbb (diff)
downloadexternal_llvm-63f331235513a6f562ab4b2809b497c518b132e9.zip
external_llvm-63f331235513a6f562ab4b2809b497c518b132e9.tar.gz
external_llvm-63f331235513a6f562ab4b2809b497c518b132e9.tar.bz2
Start static relocation implementation for mips16.
This checkin makes hello world work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/helloworld.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/helloworld.ll b/test/CodeGen/Mips/helloworld.ll
index aee58b6..fef5a70 100644
--- a/test/CodeGen/Mips/helloworld.ll
+++ b/test/CodeGen/Mips/helloworld.ll
@@ -1,6 +1,8 @@
; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=C1
; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=C2
; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=PE
+; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=static -O3 < %s | FileCheck %s -check-prefix=ST1
+; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=static -O3 < %s | FileCheck %s -check-prefix=ST2
;
; re-enable this when mips16's jalr is fixed.
; DISABLED: llc -march=mipsel -mcpu=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=SR
@@ -29,6 +31,11 @@ entry:
; PE: li $2, 0
; PE: jrc $ra
+; ST1: li ${{[0-9]+}}, %hi($.str)
+; ST1: sll ${{[0-9]+}}, ${{[0-9]+}}, 16
+; ST1: addiu ${{[0-9]+}}, %lo($.str)
+; ST2: li ${{[0-9]+}}, %hi($.str)
+; ST2: jal printf
}
declare i32 @printf(i8*, ...)