blob: e171b367c47e2d409756f84cbefe5de42212fe40 [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 nomips16 # @foo
14; 32: .ent foo
15; 32: .set noreorder
16; 32: .set nomacro
17; 32: .set noat
18; 32: jr $ra
19; 32: nop
20; 32: .set at
21; 32: .set macro
22; 32: .set reorder
23; 32: .end foo
24define void @nofoo() #1 {
25entry:
26 ret void
27}
28
29; 16: .set nomips16 # @nofoo
30; 16: .ent nofoo
31; 16: .set noreorder
32; 16: .set nomacro
33; 16: .set noat
34; 16: jr $ra
35; 16: nop
36; 16: .set at
37; 16: .set macro
38; 16: .set reorder
39; 16: .end nofoo
40; 32: .set nomips16 # @nofoo
41; 32: .ent nofoo
42; 32: .set noreorder
43; 32: .set nomacro
44; 32: .set noat
45; 32: jr $ra
46; 32: nop
47; 32: .set at
48; 32: .set macro
49; 32: .set reorder
50; 32: .end nofoo
51define i32 @main() #2 {
52entry:
53 ret i32 0
54}
55
56; 16: .set mips16 # @main
57; 16: .ent main
Reed Kotler5c29d632013-12-15 20:49:30 +000058; 16: jrc $ra
Reed Kotler1595f362013-04-09 19:46:01 +000059; 16: .end main
60
61; 32: .set mips16 # @main
62; 32: .ent main
Reed Kotler5c29d632013-12-15 20:49:30 +000063; 32: jrc $ra
Reed Kotler1595f362013-04-09 19:46:01 +000064; 32: .end main
65
66
67
68
69
70
Bill Wendling187d3dd2013-08-22 21:28:54 +000071attributes #0 = { 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" "unsafe-fp-math"="false" "use-soft-float"="false" }
72attributes #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" }
73attributes #2 = { 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" }