1# source file to test illegal mips32r2 instructions
2
3        .set noreorder
4      .set noat
5
6      .text
7text_label:
8
9      # insert and extract position/size checks:
10
11	# ext constraint: 0 <= pos < 32
12	ext	$4, $5, -1, 1		# error
13	ext	$4, $5, 0, 1
14	ext	$4, $5, 31, 1
15	ext	$4, $5, 32, 1		# error
16
17	# ext constraint: 0 < size <= 32
18	ext	$4, $5, 0, 0		# error
19	ext	$4, $5, 0, 1
20	ext	$4, $5, 0, 32
21	ext	$4, $5, 0, 33		# error
22
23	# ext constraint: 0 < (pos+size) <= 32
24	ext	$4, $5, 0, 0		# error
25	ext	$4, $5, 0, 1
26	ext	$4, $5, 31, 1
27	ext	$4, $5, 31, 2		# error
28
29	# ins constraint: 0 <= pos < 32
30	ins	$4, $5, -1, 1		# error
31	ins	$4, $5, 0, 1
32	ins	$4, $5, 31, 1
33	ins	$4, $5, 32, 1		# error
34
35	# ins constraint: 0 < size <= 32
36	ins	$4, $5, 0, 0		# error
37	ins	$4, $5, 0, 1
38	ins	$4, $5, 0, 32
39	ins	$4, $5, 0, 33		# error
40
41	# ins constraint: 0 < (pos+size) <= 32
42	ins	$4, $5, 0, 0		# error
43	ins	$4, $5, 0, 1
44	ins	$4, $5, 31, 1
45	ins	$4, $5, 31, 2		# error
46
47# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
48	.space  8
49