File: mips64r2-ill.s

package info (click to toggle)
binutils 2.34-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 328,380 kB
  • sloc: ansic: 1,180,155; asm: 665,310; cpp: 130,540; exp: 69,822; makefile: 57,183; sh: 22,559; yacc: 14,469; lisp: 13,785; perl: 2,112; ada: 1,681; lex: 1,650; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (186 lines) | stat: -rw-r--r-- 4,686 bytes parent folder | download | duplicates (41)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# source file to test illegal mips64r2 instructions

        .set noreorder
      .set noat

      .text
text_label:

      # dext macro position/size checks

	# constraint: 0 <= pos < 64
	dext	$4, $5, -1, 1		# error (position)
	dext	$4, $5, 0, 1
	dext	$4, $5, 63, 1
	dext	$4, $5, 64, 1		# error (position)

	# constraint: 0 < size <= 64
	dext	$4, $5, 0, 0		# error (size)
	dext	$4, $5, 0, 1
	dext	$4, $5, 0, 64
	dext	$4, $5, 0, 65		# error (size)

	# constraint: 0 < (pos+size) <= 64
	dext	$4, $5, 0, 1
	dext	$4, $5, 0, 2
	dext	$4, $5, 0, 63
	dext	$4, $5, 0, 64
	dext	$4, $5, 1, 1
	dext	$4, $5, 1, 2
	dext	$4, $5, 1, 63
	dext	$4, $5, 1, 64		# error (size)
	dext	$4, $5, 63, 1
	dext	$4, $5, 63, 2		# error (size)
	dext	$4, $5, 63, 63		# error (size)
	dext	$4, $5, 63, 64		# error (size)

      # dextm instruction position/size checks

	# constraint: 0 <= pos < 32
	dextm	$4, $5, -1, 33		# error (position)
	dextm	$4, $5, 0, 33
	dextm	$4, $5, 31, 33
	dextm	$4, $5, 32, 33		# error (position)

	# constraint: 32 < size <= 64
	dextm	$4, $5, 0, 32		# error (size)
	dextm	$4, $5, 0, 33
	dextm	$4, $5, 0, 64
	dextm	$4, $5, 0, 65		# error (size)

	# constraint: 32 < (pos+size) <= 64
	dextm	$4, $5, 0, 33
	dextm	$4, $5, 0, 34
	dextm	$4, $5, 0, 63
	dextm	$4, $5, 0, 64
	dextm	$4, $5, 1, 33
	dextm	$4, $5, 1, 34
	dextm	$4, $5, 1, 63
	dextm	$4, $5, 1, 64		# error (size)
	dextm	$4, $5, 31, 33
	dextm	$4, $5, 31, 34		# error (size)
	dextm	$4, $5, 31, 63		# error (size)
	dextm	$4, $5, 31, 64		# error (size)

      # dextu instruction position/size checks

	# constraint: 32 <= pos < 64
	dextu	$4, $5, 31, 1		# error (position)
	dextu	$4, $5, 32, 1
	dextu	$4, $5, 63, 1
	dextu	$4, $5, 64, 1		# error (position)

	# constraint: 0 < size <= 32
	dextu	$4, $5, 32, 0		# error (size)
	dextu	$4, $5, 32, 1
	dextu	$4, $5, 32, 32
	dextu	$4, $5, 32, 33		# error (size)

	# constraint: 32 < (pos+size) <= 64
	dextu	$4, $5, 32, 1
	dextu	$4, $5, 32, 2
	dextu	$4, $5, 32, 31
	dextu	$4, $5, 32, 32
	dextu	$4, $5, 33, 1
	dextu	$4, $5, 33, 2
	dextu	$4, $5, 33, 31
	dextu	$4, $5, 33, 32		# error (size)
	dextu	$4, $5, 63, 1
	dextu	$4, $5, 63, 2		# error (size)
	dextu	$4, $5, 63, 31		# error (size)
	dextu	$4, $5, 63, 32		# error (size)

      # dins macro position/size checks

	# constraint: 0 <= pos < 64
	dins	$4, $5, -1, 1		# error (position)
	dins	$4, $5, 0, 1
	dins	$4, $5, 63, 1
	dins	$4, $5, 64, 1		# error (position)

	# constraint: 0 < size <= 64
	dins	$4, $5, 0, 0		# error (size)
	dins	$4, $5, 0, 1
	dins	$4, $5, 0, 64
	dins	$4, $5, 0, 65		# error (size)

	# constraint: 0 < (pos+size) <= 64
	dins	$4, $5, 0, 1
	dins	$4, $5, 0, 2
	dins	$4, $5, 0, 63
	dins	$4, $5, 0, 64
	dins	$4, $5, 1, 1
	dins	$4, $5, 1, 2
	dins	$4, $5, 1, 63
	dins	$4, $5, 1, 64		# error (size)
	dins	$4, $5, 63, 1
	dins	$4, $5, 63, 2		# error (size)
	dins	$4, $5, 63, 63		# error (size)
	dins	$4, $5, 63, 64		# error (size)

      # dinsm instruction position/size checks

	# constraint: 0 <= pos < 32
	dinsm	$4, $5, -1, 33		# error (position)
	dinsm	$4, $5, 0, 33
	dinsm	$4, $5, 31, 33
	dinsm	$4, $5, 32, 33		# error (position)

	# constraint: 2 <= size <= 64
	dinsm	$4, $5, 31, 1		# error (size)
	dinsm	$4, $5, 31, 2
	dinsm	$4, $5, 0, 64
	dinsm	$4, $5, 0, 65		# error (size)

	# constraint: 32 < (pos+size) <= 64
	dinsm	$4, $5, 0, 2		# error (size)
	dinsm	$4, $5, 0, 3		# error (size)
	dinsm	$4, $5, 0, 63
	dinsm	$4, $5, 0, 64
	dinsm	$4, $5, 1, 2		# error (size)
	dinsm	$4, $5, 1, 3		# error (size)
	dinsm	$4, $5, 1, 63
	dinsm	$4, $5, 1, 64		# error (size)
	dinsm	$4, $5, 30, 2		# error (size)
	dinsm	$4, $5, 30, 3
	dinsm	$4, $5, 30, 63		# error (size)
	dinsm	$4, $5, 30, 64		# error (size)
	dinsm	$4, $5, 31, 2
	dinsm	$4, $5, 31, 3
	dinsm	$4, $5, 31, 63		# error (size)
	dinsm	$4, $5, 31, 64		# error (size)

      # dinsu instruction position/size checks

	# constraint: 32 <= pos < 64
	dinsu	$4, $5, 31, 1		# error (position)
	dinsu	$4, $5, 32, 1
	dinsu	$4, $5, 63, 1
	dinsu	$4, $5, 64, 1		# error (position)

	# constraint: 1 <= size <= 32
	dinsu	$4, $5, 32, 0		# error (size)
	dinsu	$4, $5, 32, 1
	dinsu	$4, $5, 32, 32
	dinsu	$4, $5, 32, 33		# error (size)

	# constraint: 32 < (pos+size) <= 64
	dinsu	$4, $5, 32, 1
	dinsu	$4, $5, 32, 2
	dinsu	$4, $5, 32, 31
	dinsu	$4, $5, 32, 32
	dinsu	$4, $5, 33, 1
	dinsu	$4, $5, 33, 2
	dinsu	$4, $5, 33, 31
	dinsu	$4, $5, 33, 32		# error (size)
	dinsu	$4, $5, 62, 1
	dinsu	$4, $5, 62, 2
	dinsu	$4, $5, 62, 31		# error (size)
	dinsu	$4, $5, 62, 32		# error (size)
	dinsu	$4, $5, 63, 1
	dinsu	$4, $5, 63, 2		# error (size)
	dinsu	$4, $5, 63, 31		# error (size)
	dinsu	$4, $5, 63, 32		# error (size)

# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
	.space  8