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]
|
95
|
42 # CHECK-EL: prefe 1, 8($5) # encoding: [0x25,0x60,0x08,0xa4]
|
|
43 # CHECK-EL: cachee 1, 8($5) # encoding: [0x25,0x60,0x08,0xa6]
|
|
44 # CHECK-EL: prefx 1, $3($5) # encoding: [0x65,0x54,0xa0,0x09]
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
45 #------------------------------------------------------------------------------
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 # Big endian
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 #------------------------------------------------------------------------------
|
83
|
48 # CHECK-EB: sdbbp # encoding: [0x00,0x00,0xdb,0x7c]
|
|
49 # CHECK-EB: sdbbp 34 # encoding: [0x00,0x22,0xdb,0x7c]
|
|
50 # CHECK-EB: .set push
|
|
51 # CHECK-EB: .set mips32r2
|
|
52 # CHECK-EB: rdhwr $5, $29
|
|
53 # CHECK-EB: .set pop # encoding: [0x00,0xbd,0x6b,0x3c]
|
|
54 # CHECK-EB: cache 1, 8($5) # encoding: [0x20,0x25,0x60,0x08]
|
|
55 # CHECK-EB: pref 1, 8($5) # encoding: [0x60,0x25,0x20,0x08]
|
|
56 # CHECK-EB: ssnop # encoding: [0x00,0x00,0x08,0x00]
|
|
57 # CHECK-EB: ehb # encoding: [0x00,0x00,0x18,0x00]
|
|
58 # CHECK-EB: pause # encoding: [0x00,0x00,0x28,0x00]
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
59 # CHECK-EB: break # encoding: [0x00,0x00,0x00,0x07]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 # CHECK-EB: break 7 # encoding: [0x00,0x07,0x00,0x07]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61 # CHECK-EB: break 7, 5 # encoding: [0x00,0x07,0x01,0x47]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
62 # CHECK-EB: syscall # encoding: [0x00,0x00,0x8b,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
63 # CHECK-EB: syscall 396 # encoding: [0x01,0x8c,0x8b,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
64 # CHECK-EB: eret # encoding: [0x00,0x00,0xf3,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65 # CHECK-EB: deret # encoding: [0x00,0x00,0xe3,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
66 # CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67 # CHECK-EB: di # encoding: [0x00,0x00,0x47,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
68 # CHECK-EB: di $10 # encoding: [0x00,0x0a,0x47,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
69 # CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
70 # CHECK-EB: ei # encoding: [0x00,0x00,0x57,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
71 # CHECK-EB: ei $10 # encoding: [0x00,0x0a,0x57,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
72 # CHECK-EB: wait # encoding: [0x00,0x00,0x93,0x7c]
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
73 # CHECK-EB: wait 17 # encoding: [0x00,0x11,0x93,0x7c]
|
83
|
74 # CHECK-EB: tlbp # encoding: [0x00,0x00,0x03,0x7c]
|
|
75 # CHECK-EB: tlbr # encoding: [0x00,0x00,0x13,0x7c]
|
|
76 # CHECK-EB: tlbwi # encoding: [0x00,0x00,0x23,0x7c]
|
|
77 # CHECK-EB: tlbwr # encoding: [0x00,0x00,0x33,0x7c]
|
95
|
78 # CHECK-EB: prefe 1, 8($5) # encoding: [0x60,0x25,0xa4,0x08]
|
|
79 # CHECK-EB: cachee 1, 8($5) # encoding: [0x60,0x25,0xa6,0x08]
|
|
80 # CHECK-EB: prefx 1, $3($5) # encoding: [0x54,0x65,0x09,0xa0]
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
81
|
83
|
82 sdbbp
|
|
83 sdbbp 34
|
|
84 rdhwr $5, $29
|
|
85 cache 1, 8($5)
|
|
86 pref 1, 8($5)
|
|
87 ssnop
|
|
88 ehb
|
|
89 pause
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
90 break
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
91 break 7
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
92 break 7,5
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
93 syscall
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
94 syscall 0x18c
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
95 eret
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
96 deret
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
97 di
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
98 di $0
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
99 di $10
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
100 ei
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
101 ei $0
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
102 ei $10
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
103 wait
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
104 wait 17
|
83
|
105 tlbp
|
|
106 tlbr
|
|
107 tlbwi
|
|
108 tlbwr
|
95
|
109 prefe 1, 8($5)
|
|
110 cachee 1, 8($5)
|
|
111 prefx 1, $3($5)
|