* arm-dis.c (print_insn): Fixed search for next
[deliverable/binutils-gdb.git] / gas / testsuite / gas / arm / req.s
CommitLineData
0bbf2aa4
NC
1 .text
2 .global test_dot_req_and_unreq
3test_dot_req_and_unreq:
4
c19d1205 5 # Check that builtin register alias 'r0' works.
0bbf2aa4
NC
6 add r0, r0, r0
7
8 # Create an alias for r0.
9 foo .req r0
10
11 # Check that it works.
12 add foo, foo, foo
13
14 # Now remove the alias.
15 .unreq foo
16
17 # And make sure that it no longer works.
18 add foo, foo, foo
19
c19d1205 20 # Attempt to remove the builtin alias for r0.
0bbf2aa4 21 .unreq r0
d929913e 22
c19d1205 23 # That is ignored, so this should still work.
0bbf2aa4 24 add r0, r0, r0
d929913e
NC
25
26 # Now attempt to re-alias foo. There used to be a bug whereby the
27 # first creation of an alias called foo would also create an alias
28 # called FOO, but the .unreq of foo would not delete FOO. Thus a
29 # second attempt at aliasing foo (to something different than
30 # before) would fail because the assembler would complain that FOO
31 # already existed.
32 foo .req r1
33
34 add foo, foo, foo
35
36 # Check that the upper case alias was also recreated.
37 add FOO, FOO, FOO
38
39 # Check that a second attempt to alias foo, using a mixed case
40 # verison of the name, will fail.
41 Foo .req r2
This page took 0.261237 seconds and 4 git commands to generate.