77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 # RUN: llvm-mc %s -triple=mipsel -show-encoding -mcpu=mips32r2 -mattr=micromips \
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 # RUN: | FileCheck -check-prefix=CHECK-EL %s
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 # RUN: llvm-mc %s -triple=mips -show-encoding -mcpu=mips32r2 -mattr=micromips \
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 # RUN: | FileCheck -check-prefix=CHECK-EB %s
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 # Check that the assembler can handle the documented syntax
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 # for control instructions.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 #------------------------------------------------------------------------------
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 # microMIPS Control Instructions
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 #------------------------------------------------------------------------------
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 # Little endian
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 #------------------------------------------------------------------------------
|
83
|
12 # CHECK-EL: sdbbp # encoding: [0x00,0x00,0x7c,0xdb]
|
|
13 # CHECK-EL: sdbbp 34 # encoding: [0x22,0x00,0x7c,0xdb]
|
|
14 # CHECK-EL: .set push
|
|
15 # CHECK-EL: .set mips32r2
|
|
16 # CHECK-EL: rdhwr $5, $29
|
|
17 # CHECK-EL: .set pop # encoding: [0xbd,0x00,0x3c,0x6b]
|
|
18 # CHECK-EL: cache 1, 8($5) # encoding: [0x25,0x20,0x08,0x60]
|
|
19 # CHECK-EL: pref 1, 8($5) # encoding: [0x25,0x60,0x08,0x20]
|
|
20 # CHECK-EL: ssnop # encoding: [0x00,0x00,0x00,0x08]
|
|
21 # CHECK-EL: ehb # encoding: [0x00,0x00,0x00,0x18]
|
|
22 # CHECK-EL: pause # encoding: [0x00,0x00,0x00,0x28]
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 # CHECK-EL: break # encoding: [0x00,0x00,0x07,0x00]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 # CHECK-EL: break 7 # encoding: [0x07,0x00,0x07,0x00]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 # CHECK-EL: break 7, 5 # encoding: [0x07,0x00,0x47,0x01]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 # CHECK-EL: syscall # encoding: [0x00,0x00,0x7c,0x8b]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 # CHECK-EL: syscall 396 # encoding: [0x8c,0x01,0x7c,0x8b]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
28 # CHECK-EL: eret # encoding: [0x00,0x00,0x7c,0xf3]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
29 # CHECK-EL: deret # encoding: [0x00,0x00,0x7c,0xe3]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 # CHECK-EL: di # encoding: [0x00,0x00,0x7c,0x47]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 # CHECK-EL: di # encoding: [0x00,0x00,0x7c,0x47]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 # CHECK-EL: di $10 # encoding: [0x0a,0x00,0x7c,0x47]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 # CHECK-EL: ei # encoding: [0x00,0x00,0x7c,0x57]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 # CHECK-EL: ei # encoding: [0x00,0x00,0x7c,0x57]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 # CHECK-EL: ei $10 # encoding: [0x0a,0x00,0x7c,0x57]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 # CHECK-EL: wait # encoding: [0x00,0x00,0x7c,0x93]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 # CHECK-EL: wait 17 # encoding: [0x11,0x00,0x7c,0x93]
|
83
|
38 # CHECK-EL: tlbp # encoding: [0x00,0x00,0x7c,0x03]
|
|
39 # CHECK-EL: tlbr # encoding: [0x00,0x00,0x7c,0x13]
|
|
40 # CHECK-EL: tlbwi # encoding: [0x00,0x00,0x7c,0x23]
|
|
41 # CHECK-EL: tlbwr # encoding: [0x00,0x00,0x7c,0x33]
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 #------------------------------------------------------------------------------
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 # Big endian
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
44 #------------------------------------------------------------------------------
|
83
|
45 # CHECK-EB: sdbbp # encoding: [0x00,0x00,0xdb,0x7c]
|
|
46 # CHECK-EB: sdbbp 34 # encoding: [0x00,0x22,0xdb,0x7c]
|
|
47 # CHECK-EB: .set push
|
|
48 # CHECK-EB: .set mips32r2
|
|
49 # CHECK-EB: rdhwr $5, $29
|
|
50 # CHECK-EB: .set pop # encoding: [0x00,0xbd,0x6b,0x3c]
|
|
51 # CHECK-EB: cache 1, 8($5) # encoding: [0x20,0x25,0x60,0x08]
|
|
52 # CHECK-EB: pref 1, 8($5) # encoding: [0x60,0x25,0x20,0x08]
|
|
53 # CHECK-EB: ssnop # encoding: [0x00,0x00,0x08,0x00]
|
|
54 # CHECK-EB: ehb # encoding: [0x00,0x00,0x18,0x00]
|
|
55 # CHECK-EB: pause # encoding: [0x00,0x00,0x28,0x00]
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
56 # CHECK-EB: break # encoding: [0x00,0x00,0x00,0x07]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
57 # CHECK-EB: break 7 # encoding: [0x00,0x07,0x00,0x07]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58 # CHECK-EB: break 7, 5 # encoding: [0x00,0x07,0x01,0x47]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
59 # CHECK-EB: syscall # encoding: [0x00,0x00,0x8b,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 # CHECK-EB: syscall 396 # encoding: [0x01,0x8c,0x8b,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61 # CHECK-EB: eret # encoding: [0x00,0x00,0xf3,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
62 # CHECK-EB: deret # encoding: [0x00,0x00,0xe3,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
63 # CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
64 # CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65 # CHECK-EB: di $10 # encoding: [0x00,0x0a,0x47,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
66 # CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67 # CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
68 # CHECK-EB: ei $10 # encoding: [0x00,0x0a,0x57,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
69 # CHECK-EB: wait # encoding: [0x00,0x00,0x93,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
70 # CHECK-EB: wait 17 # encoding: [0x00,0x11,0x93,0x7c]
|
83
|
71 # CHECK-EB: tlbp # encoding: [0x00,0x00,0x03,0x7c]
|
|
72 # CHECK-EB: tlbr # encoding: [0x00,0x00,0x13,0x7c]
|
|
73 # CHECK-EB: tlbwi # encoding: [0x00,0x00,0x23,0x7c]
|
|
74 # CHECK-EB: tlbwr # encoding: [0x00,0x00,0x33,0x7c]
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
75
|
83
|
76 sdbbp
|
|
77 sdbbp 34
|
|
78 rdhwr $5, $29
|
|
79 cache 1, 8($5)
|
|
80 pref 1, 8($5)
|
|
81 ssnop
|
|
82 ehb
|
|
83 pause
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
84 break
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
85 break 7
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
86 break 7,5
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
87 syscall
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
88 syscall 0x18c
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
89 eret
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
90 deret
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
91 di
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
92 di $0
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
93 di $10
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
94 ei
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
95 ei $0
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
96 ei $10
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
97 wait
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
98 wait 17
|
83
|
99 tlbp
|
|
100 tlbr
|
|
101 tlbwi
|
|
102 tlbwr
|