[mips patch RFA] test gas's setting of ELF arch flags!
cgd@broadcom.com
cgd@broadcom.com
Mon Dec 30 21:43:00 GMT 2002
When adding m32r2 support i noticed that nothing in the current gas
tests actually test that gas is setting the ELF arch flags correctly!
(iirc, rsandifo's link compatibility test patch does so indirectly,
but I'm a fan of direct checking too. 8-)
applies over the m32r2 patch:
http://sources.redhat.com/ml/binutils/2002-12/msg00783.html
and tested the same way.
cgd
==
[ gas/testsuite/ChangeLog ]
2002-12-30 Chris Demetriou <cgd@broadcom.com>
* gas/mips/elf_arch_mips1.d: New test.
* gas/mips/elf_arch_mips2.d: New test.
* gas/mips/elf_arch_mips3.d: New test.
* gas/mips/elf_arch_mips4.d: New test.
* gas/mips/elf_arch_mips5.d: New test.
* gas/mips/elf_arch_mips32.d: New test.
* gas/mips/elf_arch_mips32r2.d: New test.
* gas/mips/elf_arch_mips64.d: New test.
* gas/mips/empty.s: New test source file.
* gas/mips/mips.exp: Run new tests.
* gas/mips/elf_ase_mips16.d: Change to use empty.s
* gas/mips/elf_ase_mips16.s: Remove.
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips1.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips1.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips1.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips1.d Sat Dec 28 13:25:04 2002
@@ -0,0 +1,10 @@
+# name: ELF MIPS1 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips1
+
+.*:.*file format.*elf.*mips.*
+# Note: objdump omits leading zeros, so must check for the fact that
+# flags are _not_ 8 chars long.
+private flags = (.......|......|.....|....|...|..|.): .*\[mips1\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips2.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips2.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips2.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips2.d Sat Dec 28 13:25:18 2002
@@ -0,0 +1,8 @@
+# name: ELF MIPS2 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips2
+
+.*:.*file format.*elf.*mips.*
+private flags = 1.......: .*\[mips2\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips3.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips3.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips3.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips3.d Sat Dec 28 13:25:28 2002
@@ -0,0 +1,8 @@
+# name: ELF MIPS3 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips3
+
+.*:.*file format.*elf.*mips.*
+private flags = 2.......: .*\[mips3\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips32.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips32.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips32.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips32.d Sat Dec 28 13:25:37 2002
@@ -0,0 +1,8 @@
+# name: ELF MIPS32 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips32
+
+.*:.*file format.*elf.*mips.*
+private flags = 5.......: .*\[mips32\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips32r2.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips32r2.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips32r2.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips32r2.d Sat Dec 28 13:25:51 2002
@@ -0,0 +1,8 @@
+# name: ELF MIPS32r2 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips32r2
+
+.*:.*file format.*elf.*mips.*
+private flags = 7.......: .*\[mips32r2\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips4.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips4.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips4.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips4.d Sat Dec 28 13:26:02 2002
@@ -0,0 +1,8 @@
+# name: ELF MIPS4 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips4
+
+.*:.*file format.*elf.*mips.*
+private flags = 3.......: .*\[mips4\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips5.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips5.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips5.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips5.d Sat Dec 28 13:26:11 2002
@@ -0,0 +1,8 @@
+# name: ELF MIPS5 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips5
+
+.*:.*file format.*elf.*mips.*
+private flags = 4.......: .*\[mips5\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_arch_mips64.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips64.d
--- src.m32r2/gas/testsuite/gas/mips/elf_arch_mips64.d Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_arch_mips64.d Sat Dec 28 13:26:21 2002
@@ -0,0 +1,8 @@
+# name: ELF MIPS64 markings
+# source: empty.s
+# objdump: -p
+# as: -march=mips64
+
+.*:.*file format.*elf.*mips.*
+private flags = 6.......: .*\[mips64\].*
+
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_ase_mips16.d src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_ase_mips16.d
--- src.m32r2/gas/testsuite/gas/mips/elf_ase_mips16.d Mon Dec 30 11:07:44 2002
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_ase_mips16.d Mon Dec 30 16:34:26 2002
@@ -1,5 +1,5 @@
# name: ELF MIPS16 ASE markings
-# source: elf_ase_mips16.s
+# source: empty.s
# objdump: -p
# as: -mips16
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/elf_ase_mips16.s src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_ase_mips16.s
--- src.m32r2/gas/testsuite/gas/mips/elf_ase_mips16.s Mon Dec 30 11:07:44 2002
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/elf_ase_mips16.s Wed Dec 31 16:00:00 1969
@@ -1,3 +0,0 @@
-# Test of MIPS16 ASE file markings.
-
- # no actual contents necessary!
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/empty.s src.m32r2+hdrflags/gas/testsuite/gas/mips/empty.s
--- src.m32r2/gas/testsuite/gas/mips/empty.s Wed Dec 31 16:00:00 1969
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/empty.s Mon Dec 30 16:34:45 2002
@@ -0,0 +1,3 @@
+# An empty source file for tests that need no instructions.
+
+ # No actual contents necessary!
diff -x CVS -rNup src.m32r2/gas/testsuite/gas/mips/mips.exp src.m32r2+hdrflags/gas/testsuite/gas/mips/mips.exp
--- src.m32r2/gas/testsuite/gas/mips/mips.exp Mon Dec 30 11:07:44 2002
+++ src.m32r2+hdrflags/gas/testsuite/gas/mips/mips.exp Mon Dec 30 11:39:02 2002
@@ -563,6 +563,16 @@ if { [istarget mips*-*-*] } then {
run_dump_test "elf_e_flags3"
run_dump_test "elf_e_flags4"
+ # Check EF_MIPS_ARCH markings for each supported architecture.
+ run_dump_test "elf_arch_mips1"
+ run_dump_test "elf_arch_mips2"
+ run_dump_test "elf_arch_mips3"
+ run_dump_test "elf_arch_mips4"
+ run_dump_test "elf_arch_mips5"
+ run_dump_test "elf_arch_mips32"
+ run_dump_test "elf_arch_mips32r2"
+ run_dump_test "elf_arch_mips64"
+
# Verify that ASE markings are handled properly.
if { !$no_mips16 } { run_dump_test "elf_ase_mips16" }
More information about the Binutils
mailing list