blob: 5bdeede5c66d4d95cd15d0041ee0c933cd5a718d [file] [log] [blame]
Reed Kotler1595f362013-04-09 19:46:01 +00001; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=static -O3 < %s -mips-mixed-16-32 | FileCheck %s -check-prefix=16
2; RUN: llc -march=mipsel -mcpu=mips32 -relocation-model=static -O3 < %s -mips-mixed-16-32 | FileCheck %s -check-prefix=32
3
4define void @foo() #0 {
5entry:
6 ret void
7}
8
9; 16: .set mips16 # @foo
10; 16: .ent foo
Reed Kotler5c29d632013-12-15 20:49:30 +000011; 16: jrc $ra
Reed Kotler1595f362013-04-09 19:46:01 +000012; 16: .end foo
13; 32: .set mips16 # @foo
14; 32: .ent foo
Reed Kotler5c29d632013-12-15 20:49:30 +000015; 32: jrc $ra
Reed Kotler1595f362013-04-09 19:46:01 +000016; 32: .end foo
17define void @nofoo() #1 {
18entry:
19 ret void
20}
21
22; 16: .set nomips16 # @nofoo
23; 16: .ent nofoo
24; 16: .set noreorder
25; 16: .set nomacro
26; 16: .set noat
27; 16: jr $ra
28; 16: nop
29; 16: .set at
30; 16: .set macro
31; 16: .set reorder
32; 16: .end nofoo
33; 32: .set nomips16 # @nofoo
34; 32: .ent nofoo
35; 32: .set noreorder
36; 32: .set nomacro
37; 32: .set noat
38; 32: jr $ra
39; 32: nop
40; 32: .set at
41; 32: .set macro
42; 32: .set reorder
43; 32: .end nofoo
44define i32 @main() #2 {
45entry:
46 ret i32 0
47}
48
49; 16: .set nomips16 # @main
50; 16: .ent main
51; 16: .set noreorder
52; 16: .set nomacro
53; 16: .set noat
54; 16: jr $ra
55; 16: addiu $2, $zero, 0
56; 16: .set at
57; 16: .set macro
58; 16: .set reorder
59; 16: .end main
60
61; 32: .set nomips16 # @main
62; 32: .ent main
63; 32: .set noreorder
64; 32: .set nomacro
65; 32: .set noat
66; 32: jr $ra
67; 32: addiu $2, $zero, 0
68; 32: .set at
69; 32: .set macro
70; 32: .set reorder
71; 32: .end main
72
73
74
75
Bill Wendling187d3dd2013-08-22 21:28:54 +000076attributes #0 = { nounwind "less-precise-fpmad"="false" "mips16" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
77attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "nomips16" "unsafe-fp-math"="false" "use-soft-float"="false" }
78attributes #2 = { nounwind "less-precise-fpmad"="false" "nomips16" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }