[GAS][ARM] Fix testism for bl local v4t test
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Fri, 23 Nov 2018 17:10:53 +0000 (17:10 +0000)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Fri, 23 Nov 2018 17:10:53 +0000 (17:10 +0000)
gas/ChangeLog
2018-11-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* testsuite/gas/arm/bl-local-v4t.d: Remove
warning check.
* testsuite/gas/arm/blx-local-thumb.s: New.
* testsuite/gas/arm/blx-local-thumb.d: New.

gas/ChangeLog
gas/testsuite/gas/arm/bl-local-v4t.d
gas/testsuite/gas/arm/blx-local-thumb.d [new file with mode: 0644]
gas/testsuite/gas/arm/blx-local-thumb.s [new file with mode: 0644]

index 1c99079..4b02996 100644 (file)
@@ -1,3 +1,10 @@
+2018-11-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       * testsuite/gas/arm/bl-local-v4t.d: Remove
+       warning check.
+       * testsuite/gas/arm/blx-local-thumb.s: New.
+       * testsuite/gas/arm/blx-local-thumb.d: New.
+
 2018-11-21 John Darrington <john@darrington.wattle.id.au>
 
        * testsuite/gas/s12z/shift.s: Add new test case.
index 2985cee..cf68093 100644 (file)
@@ -2,7 +2,6 @@
 #objdump: -drw --prefix-addresses --show-raw-insn
 #target: *-*-*eabi* *-*-nacl*
 #as:
-#warning_output: blx-local-thumb.l
 
 .*: +file format .*arm.*
 Disassembly of section .text:
diff --git a/gas/testsuite/gas/arm/blx-local-thumb.d b/gas/testsuite/gas/arm/blx-local-thumb.d
new file mode 100644 (file)
index 0000000..a0a2c04
--- /dev/null
@@ -0,0 +1,24 @@
+#name: Local BLX instructions in Thumb mode.
+#objdump: -drw --prefix-addresses --show-raw-insn
+#skip: *-*-pe *-*-wince
+#as:
+#warning_output: blx-local-thumb.l
+
+.*: +file format .*arm.*
+Disassembly of section .text:
+[^<]*<one> f000 f80e   bl      00000020 <foo>
+[^<]*<one\+0x4> f000 e812      blx     0000002c <foo2>
+[^<]*<one\+0x8> f000 f80a      bl      00000020 <foo>
+[^<]*<one\+0xc> f000 e80e      blx     0000002c <foo2>
+[^<]*<one\+0x10> f000 e80e     blx     00000030 <fooundefarm>
+[^<]*<one\+0x14> f000 f80c     bl      00000030 <fooundefarm>
+[^<]*<one\+0x18> f000 e806     blx     00000028 <fooundefthumb>
+[^<]*<one\+0x1c> f000 f804     bl      00000028 <fooundefthumb>
+[^<]*<foo> e7ee        b.n     00000000 <one>
+[^<]*<foo\+0x2> e003           b.n     0000002c <foo2>
+[^<]*<foo\+0x4> 46c0           nop                     ; \(mov r8, r8\)
+[^<]*<foo\+0x6> 46c0           nop                     ; \(mov r8, r8\)
+[^<]*<fooundefthumb> 46c0              nop                     ; \(mov r8, r8\)
+       ...
+[^<]*<foo2> e1a00000   nop                     ; \(mov r0, r0\)
+[^<]*<fooundefarm> e1a00000    nop                     ; \(mov r0, r0\)
diff --git a/gas/testsuite/gas/arm/blx-local-thumb.s b/gas/testsuite/gas/arm/blx-local-thumb.s
new file mode 100644 (file)
index 0000000..504aa96
--- /dev/null
@@ -0,0 +1,30 @@
+        .text
+       .arch armv5t
+       .syntax unified
+       .thumb
+one:
+        blx    foo   @ bl foo
+       blx     foo2  @ blx foo2
+       bl      foo   @ bl foo
+       bl      foo2  @ blx foo2
+       blx     fooundefarm
+       bl      fooundefarm
+       blx     fooundefthumb
+       bl      fooundefthumb
+       .thumb
+        .type foo, %function
+        .thumb_func
+foo:
+       b  one  @no relocs
+       b  foo2 @ THUMB_PCREL_JUMP
+        nop
+       nop
+fooundefthumb:
+       nop
+        .type foo2, %function
+       .arm
+       .align  2
+foo2:
+        nop
+fooundefarm:
+       nop