blob: f8726eadc70ccfcabc48a8cc9f5f72db848dca07 [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
11; 16: save {{.+}}
12; 16: restore {{.+}}
13; 16: .end foo
14; 32: .set nomips16 # @foo
15; 32: .ent foo
16; 32: .set noreorder
17; 32: .set nomacro
18; 32: .set noat
19; 32: jr $ra
20; 32: nop
21; 32: .set at
22; 32: .set macro
23; 32: .set reorder
24; 32: .end foo
25define void @nofoo() #1 {
26entry:
27 ret void
28}
29
30; 16: .set nomips16 # @nofoo
31; 16: .ent nofoo
32; 16: .set noreorder
33; 16: .set nomacro
34; 16: .set noat
35; 16: jr $ra
36; 16: nop
37; 16: .set at
38; 16: .set macro
39; 16: .set reorder
40; 16: .end nofoo
41; 32: .set nomips16 # @nofoo
42; 32: .ent nofoo
43; 32: .set noreorder
44; 32: .set nomacro
45; 32: .set noat
46; 32: jr $ra
47; 32: nop
48; 32: .set at
49; 32: .set macro
50; 32: .set reorder
51; 32: .end nofoo
52define i32 @main() #2 {
53entry:
54 ret i32 0
55}
56
57; 16: .set mips16 # @main
58; 16: .ent main
59; 16: save {{.+}}
60; 16: restore {{.+}}
61; 16: .end main
62
63; 32: .set mips16 # @main
64; 32: .ent main
65; 32: save {{.+}}
66; 32: restore {{.+}}
67; 32: .end main
68
69
70
71
72
73
74attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
75attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "nomips16" "unsafe-fp-math"="false" "use-soft-float"="false" }
76attributes #2 = { nounwind "less-precise-fpmad"="false" "mips16" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }