1 .text 2 .global test_dot_req_and_unreq 3test_dot_req_and_unreq: 4 5 # Check that builtin register alias 'r0' works. 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 20 # Attempt to remove the builtin alias for r0. 21 .unreq r0 22 23 # That is ignored, so this should still work. 24 add r0, r0, r0 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 42