1# RUN: llvm-mc %s -arch=mips -mcpu=mips32 | FileCheck %s --check-prefix=ASM
2
3# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -filetype=obj -o - | \
4# RUN:   llvm-readobj --symbols - | FileCheck %s --check-prefix=OBJ
5
6  .set micromips
7
8  .global f_mm_insn_data
9  .type f_mm_insn_data, @function
10f_mm_insn_data:
11  .insn
12  .word 0x00e73910   # add $7, $7, $7
13
14  .global f_mm_insn_instr
15  .type f_mm_insn_instr, @function
16f_mm_insn_instr:
17  .insn
18  add $7, $7, $7
19
20  .global o_mm_insn_data
21  .type o_mm_insn_data, @object
22o_mm_insn_data:
23  .insn
24  .word 0x00e73910   # add $7, $7, $7
25
26  .global o_mm_insn_instr
27  .type o_mm_insn_instr, @object
28o_mm_insn_instr:
29  .insn
30  add $7, $7, $7
31
32  .set nomicromips
33
34  .global f_normal_insn_data
35  .type f_normal_insn_data, @function
36f_normal_insn_data:
37  .insn
38  .word 0x00e73820   # add $7, $7, $7
39
40  .global f_normal_insn_instr
41  .type f_normal_insn_instr, @function
42f_normal_insn_instr:
43  .insn
44  add $7, $7, $7
45
46  .global o_normal_insn_data
47  .type o_normal_insn_data, @object
48o_normal_insn_data:
49  .insn
50  .word 0x00e73820   # add $7, $7, $7
51
52  .global o_normal_insn_instr
53  .type o_normal_insn_instr, @object
54o_normal_insn_instr:
55  .insn
56  add $7, $7, $7
57
58# Verify that .insn causes the currently saved labels to be cleared by checking
59# that foo doesn't get marked.
60  .set nomicromips
61foo:
62  .insn
63  .word 0x00e73820   # add $7, $7, $7
64
65  .set micromips
66bar:
67  add $7, $7, $7
68
69# ASM: .insn
70
71# OBJ: Symbols [
72# OBJ: Name: foo
73# OBJ: Other: 0
74
75# OBJ: Name: f_mm_insn_data
76# OBJ: Other [ (0x80)
77
78# OBJ: Name: f_mm_insn_instr
79# OBJ: Other [ (0x80)
80
81# OBJ: Name: o_mm_insn_data
82# OBJ: Other [ (0x80)
83
84# OBJ: Name: o_mm_insn_instr
85# OBJ: Other [ (0x80)
86
87# OBJ: Name: f_normal_insn_data
88# OBJ: Other: 0
89
90# OBJ: Name: f_normal_insn_instr
91# OBJ: Other: 0
92
93# OBJ: Name: o_normal_insn_data
94# OBJ: Other: 0
95
96# OBJ: Name: o_normal_insn_instr
97# OBJ: Other: 0
98# OBJ: ]
99