summaryrefslogtreecommitdiffstats
path: root/binutils-2.17/gas/testsuite/gas/arm/archv6t2-bad.s
blob: af1397271b629b0293d728ba1ebd6e5d656b767d (plain)
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
	@ We do not bother testing simple cases, e.g. immediates where
	@ registers belong, trailing junk at end of line.
	.text
x:
	@ pc not allowed
	bfc	pc,#0,#1
	bfi	pc,r0,#0,#1
	movw	pc,#0
	movt	pc,#0

	@ bitfield range limits
	bfc	r0,#0,#0
	bfc	r0,#32,#0
	bfc	r0,#0,#33
	bfc	r0,#33,#1
	bfc	r0,#32,#1
	bfc	r0,#28,#10

	bfi	r0,r1,#0,#0
	bfi	r0,r1,#32,#0
	bfi	r0,r1,#0,#33
	bfi	r0,r1,#33,#1
	bfi	r0,r1,#32,#1
	bfi	r0,r1,#28,#10

	sbfx	r0,r1,#0,#0
	sbfx	r0,r1,#32,#0
	sbfx	r0,r1,#0,#33
	sbfx	r0,r1,#33,#1
	sbfx	r0,r1,#32,#1
	sbfx	r0,r1,#28,#10

	ubfx	r0,r1,#0,#0
	ubfx	r0,r1,#32,#0
	ubfx	r0,r1,#0,#33
	ubfx	r0,r1,#33,#1
	ubfx	r0,r1,#32,#1
	ubfx	r0,r1,#28,#10

	@ bfi accepts only #0 in Rm position
	bfi	r0,#1,#2,#3

	@ mov16 range limits
	movt	r0,#65537
	movw	r0,#65537
	movt	r0,#-1
	movw	r0,#-1

	@ ldsttv4 Rd == Rn (warning)
	ldrht	r0,[r0]
	ldrsbt	r0,[r0]
	ldrsht	r0,[r0]
	strht	r0,[r0]

	@ Bug reported by user.  GAS used to issue an error message
	@ "r15 not allowed here" for these two instructions because
	@ it thought that the "r2" operand was a PC-relative branch
	@ to a label called "r2".
	ldrex	r0, r2
	strex	r1, r0, r2