[Arm] Clean up PE GAS testsuite correct THUMB tests.

Message ID 20190117152451.GA19667@arm.com
State New
Headers show
Series
  • [Arm] Clean up PE GAS testsuite correct THUMB tests.
Related show

Commit Message

Tamar Christina Jan. 17, 2019, 3:24 p.m.
Hi All,

The PE targets don't support mapping symbols and so the disassembler is unable
to correctly output thumb instructions when the input was thumb.

So for testcases that only have thumb output, I have copied them and skipped the
ones for which auto-detection is supposed to work on PE, and added a new one
that will force thumb output.  This so that the tests still check the mapping
symbols.

For the tests that switch between thumb and arm in one file I just skip them
entirely on PE targets.

This cleans up the PE GAS testsuite.

build on native hardware and regtested on
  arm-none-elf, arm-none-elf (32 bit host),
  arm-none-linux-gnueabihf, arm-none-linux-gnueabihf (32 bit host)

Cross-compiled and regtested on
  arm-none-linux-gnueabihf, armeb-none-elf, arm-wince-pe

and no issues.

Ok for master?

Thanks,
Tamar

gas/ChangeLog:

2019-01-17  Tamar Christina  <tamar.christina@arm.com>

	* testsuite/gas/arm/archv6t2-1-pe.d: New test.
	* testsuite/gas/arm/archv6t2-1.d: Skip pe.
	* testsuite/gas/arm/csdb.d: Skip pe.
	* testsuite/gas/arm/sb-thumb1-pe.d: New test.
	* testsuite/gas/arm/sb-thumb1.d: Skip pe.
	* testsuite/gas/arm/sb-thumb2-pe.d: New test.
	* testsuite/gas/arm/sb-thumb2.d: Skip pe.
	* testsuite/gas/arm/udf.d: Skip pe.

--

Comments

Nick Clifton Jan. 17, 2019, 3:35 p.m. | #1
Hi Tamar,

> gas/ChangeLog:

> 

> 2019-01-17  Tamar Christina  <tamar.christina@arm.com>

> 

> 	* testsuite/gas/arm/archv6t2-1-pe.d: New test.

> 	* testsuite/gas/arm/archv6t2-1.d: Skip pe.

> 	* testsuite/gas/arm/csdb.d: Skip pe.

> 	* testsuite/gas/arm/sb-thumb1-pe.d: New test.

> 	* testsuite/gas/arm/sb-thumb1.d: Skip pe.

> 	* testsuite/gas/arm/sb-thumb2-pe.d: New test.

> 	* testsuite/gas/arm/sb-thumb2.d: Skip pe.

> 	* testsuite/gas/arm/udf.d: Skip pe.


Approved - please apply.

Cheers
  Nick

Patch

diff --git a/gas/testsuite/gas/arm/archv6t2-1-pe.d b/gas/testsuite/gas/arm/archv6t2-1-pe.d
new file mode 100644
index 0000000000000000000000000000000000000000..5f98e61c8dee9abc9e1322daad2d82dd17477c02
--- /dev/null
+++ b/gas/testsuite/gas/arm/archv6t2-1-pe.d
@@ -0,0 +1,12 @@ 
+# name: ARMv6T2 THUMB mode
+# as: -march=armv6t2 -mthumb
+# source: archv6t2-1.s
+# objdump: -dr --prefix-addresses --show-raw-insn -M force-thumb
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0[0-9a-f]+ <[^>]+> bf10      	yield
+0[0-9a-f]+ <[^>]+> bf20      	wfe
+0[0-9a-f]+ <[^>]+> bf30      	wfi
+0[0-9a-f]+ <[^>]+> bf40      	sev
diff --git a/gas/testsuite/gas/arm/archv6t2-1.d b/gas/testsuite/gas/arm/archv6t2-1.d
index a4b4c34f5d32019b266a8276a65153298c1d4921..49853eaa0602bcf91cf2b6479da69be3c97af096 100644
--- a/gas/testsuite/gas/arm/archv6t2-1.d
+++ b/gas/testsuite/gas/arm/archv6t2-1.d
@@ -2,6 +2,7 @@ 
 # as: -march=armv6t2 -mthumb
 # source: archv6t2-1.s
 # objdump: -dr --prefix-addresses --show-raw-insn
+# skip: *-*-pe *-*-wince
 
 .*: +file format .*arm.*
 
diff --git a/gas/testsuite/gas/arm/csdb.d b/gas/testsuite/gas/arm/csdb.d
index db73907be4337b4e2efb1f534fb75c01e85cc4dd..0ba5b6feac3d33a6659bfc8d1f08237e9f4f5234 100644
--- a/gas/testsuite/gas/arm/csdb.d
+++ b/gas/testsuite/gas/arm/csdb.d
@@ -1,6 +1,7 @@ 
 #name: CSDB
 #source: csdb.s
 #objdump: -dr --prefix-addresses --show-raw-insn
+#skip: *-*-pe *-*-wince
 
 .*: +file format .*arm.*
 
diff --git a/gas/testsuite/gas/arm/sb-thumb1-pe.d b/gas/testsuite/gas/arm/sb-thumb1-pe.d
new file mode 100644
index 0000000000000000000000000000000000000000..850c93fd0de895ce0c7d338dc8c22317c5e09e7a
--- /dev/null
+++ b/gas/testsuite/gas/arm/sb-thumb1-pe.d
@@ -0,0 +1,11 @@ 
+#objdump: -dr --prefix-addresses --show-raw-insn -M force-thumb
+#name: SB instruction (Thumb)
+#source: sb.s
+#as: -march=armv8.5-a -mthumb
+
+# Test SB Instruction
+
+.*: *file format .*arm.*
+
+Disassembly of section .text:
+.*> f3bf 8f70 	sb
diff --git a/gas/testsuite/gas/arm/sb-thumb1.d b/gas/testsuite/gas/arm/sb-thumb1.d
index dc3bc4945ddebbe08bdb2e7a00c6eff271ee409c..3ee55139b027721c9eb139421e7e6ccd16647e66 100644
--- a/gas/testsuite/gas/arm/sb-thumb1.d
+++ b/gas/testsuite/gas/arm/sb-thumb1.d
@@ -2,8 +2,9 @@ 
 #name: SB instruction (Thumb)
 #source: sb.s
 #as: -march=armv8.5-a -mthumb
+#skip: *-*-pe *-*-wince
 
-# Test SB Instructio
+# Test SB Instruction
 
 .*: *file format .*arm.*
 
diff --git a/gas/testsuite/gas/arm/sb-thumb2-pe.d b/gas/testsuite/gas/arm/sb-thumb2-pe.d
new file mode 100644
index 0000000000000000000000000000000000000000..681d985dfbf97b03e01eccda92f8040548e7e4ab
--- /dev/null
+++ b/gas/testsuite/gas/arm/sb-thumb2-pe.d
@@ -0,0 +1,11 @@ 
+#objdump: -dr --prefix-addresses --show-raw-insn -M force-thumb
+#name: SB instruction (Thumb) with +sb
+#source: sb.s
+#as: -march=armv8-a+sb -mthumb
+
+# Test SB Instructio
+
+.*: *file format .*arm.*
+
+Disassembly of section .text:
+.*> f3bf 8f70 	sb
diff --git a/gas/testsuite/gas/arm/sb-thumb2.d b/gas/testsuite/gas/arm/sb-thumb2.d
index 892ca8f0758668e2d86d7e03b4538b9a3f643e9b..c9badee3d06d16e9baa9ff440fcb8b8f5dc58e7c 100644
--- a/gas/testsuite/gas/arm/sb-thumb2.d
+++ b/gas/testsuite/gas/arm/sb-thumb2.d
@@ -2,6 +2,7 @@ 
 #name: SB instruction (Thumb) with +sb
 #source: sb.s
 #as: -march=armv8-a+sb -mthumb
+#skip: *-*-pe *-*-wince
 
 # Test SB Instructio
 
diff --git a/gas/testsuite/gas/arm/udf.d b/gas/testsuite/gas/arm/udf.d
index ef24209aec27d0440f8109dc27d9e357c8a51b9f..f53a43757e41503da693bc22fd4b7ab16a9492b3 100644
--- a/gas/testsuite/gas/arm/udf.d
+++ b/gas/testsuite/gas/arm/udf.d
@@ -2,6 +2,7 @@ 
 #name: UDF
 #as: -march=armv8-a
 #warning_output: udf.l
+#skip: *-*-pe *-*-wince
 
 .*: +file format .*arm.*