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