Update .MIPS.abiflags to support MIPS R6
authorMatthew Fortune <matthew.fortune@imgtec.com>
Tue, 4 Nov 2014 23:37:28 +0000 (23:37 +0000)
committerMatthew Fortune <matthew.fortune@imgtec.com>
Wed, 5 Nov 2014 10:48:38 +0000 (10:48 +0000)
bfd/

* elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6
and E_MIPS_ARCH_64R6 support.

ld/testsuite/

* ld-mips-elf/abiflags-strip10-ph.d: New file.
* ld-mips-elf/mips-eld.exp: Run the new test.

gas/

* config/tc-mips.c (mips_elf_final_processing): Add INSN_ISA32R6
and INSN_ISA64R6 support.

gas/testsuite/

* gas/mips/elf_arch_mips32r6.d: New file.
* gas/mips/elf_arch_mips64r6.d: New file.
* gas/mips/mips.exp: Run the new tests.

bfd/ChangeLog
bfd/elfxx-mips.c
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/elf_arch_mips32r6.d [new file with mode: 0644]
gas/testsuite/gas/mips/elf_arch_mips64r6.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/abiflags-strip10-ph.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips-elf.exp

index 4b4086041924c87d4bd179af68917fc79359ec66..8df2fd7a117e9fb0a0c76aabd8e23bb3c2972995 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-05  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6
+       and E_MIPS_ARCH_64R6 support.
+
 2014-11-05  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/17512
index f82102a54623f75ef96ecc8c807d0fc413170659..c599366396a91e309a3d80eec291a33038562f06 100644 (file)
@@ -13959,6 +13959,10 @@ update_mips_abiflags_isa (bfd *abfd, Elf_Internal_ABIFlags_v0 *abiflags)
       if (abiflags->isa_rev < 2)
        abiflags->isa_rev = 2;
       break;
+    case E_MIPS_ARCH_32R6:
+      abiflags->isa_level = 32;
+      abiflags->isa_rev = 6;
+      break;
     case E_MIPS_ARCH_64:
       abiflags->isa_level = 64;
       abiflags->isa_rev = 1;
@@ -13969,6 +13973,10 @@ update_mips_abiflags_isa (bfd *abfd, Elf_Internal_ABIFlags_v0 *abiflags)
       if (abiflags->isa_rev < 2)
        abiflags->isa_rev = 2;
       break;
+    case E_MIPS_ARCH_64R6:
+      abiflags->isa_level = 64;
+      abiflags->isa_rev = 6;
+      break;
     default:
       (*_bfd_error_handler)
        (_("%B: Unknown architecture %s"),
index 0bbdc6334dcc49b77792a4148b6bccbed131dd6d..0d6ef3ba3ace765b14be9323e76ee1ecd6f411f0 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-05  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * config/tc-mips.c (mips_elf_final_processing): Add INSN_ISA32R6
+       and INSN_ISA64R6 support.
+
 2014-11-04  Alan Modra  <amodra@gmail.com>
 
        * expr.c (expr_symbol_where): Don't use register keyword.
index 607689b5670ceb75d9fb2ecc74cbc2db02162b9c..c9266dbedf37134398381f28c93973182e40a871 100644 (file)
@@ -17971,6 +17971,10 @@ mips_elf_final_processing (void)
       flags.isa_level = 32;
       flags.isa_rev = 5;
       break;
+    case INSN_ISA32R6:
+      flags.isa_level = 32;
+      flags.isa_rev = 6;
+      break;
     case INSN_ISA64:
       flags.isa_level = 64;
       flags.isa_rev = 1;
@@ -17987,6 +17991,10 @@ mips_elf_final_processing (void)
       flags.isa_level = 64;
       flags.isa_rev = 5;
       break;
+    case INSN_ISA64R6:
+      flags.isa_level = 64;
+      flags.isa_rev = 6;
+      break;
     }
 
   flags.gpr_size = file_mips_opts.gp == 32 ? AFL_REG_32 : AFL_REG_64;
index 1b41cc426f455ae780846b5be3907d477c803395..4c69862f9a8f5e3b5ad2b4880f6ce14894611f04 100644 (file)
@@ -1,3 +1,9 @@
+2014-05-11  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * gas/mips/elf_arch_mips32r6.d: New file.
+       * gas/mips/elf_arch_mips64r6.d: New file.
+       * gas/mips/mips.exp: Run the new tests.
+
 2014-10-31  Andrew Pinski  <apinski@cavium.com>
             Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
 
diff --git a/gas/testsuite/gas/mips/elf_arch_mips32r6.d b/gas/testsuite/gas/mips/elf_arch_mips32r6.d
new file mode 100644 (file)
index 0000000..eefba45
--- /dev/null
@@ -0,0 +1,21 @@
+# name: ELF MIPS32r5 markings
+# source: empty.s
+# objdump: -p
+# as: -32 -march=mips32r6
+
+.*:.*file format.*elf.*mips.*
+private flags = 9.......: .*\[mips32r6\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r6
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+       None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
diff --git a/gas/testsuite/gas/mips/elf_arch_mips64r6.d b/gas/testsuite/gas/mips/elf_arch_mips64r6.d
new file mode 100644 (file)
index 0000000..7cdea4d
--- /dev/null
@@ -0,0 +1,21 @@
+# name: ELF MIPS64r6 markings
+# source: empty.s
+# objdump: -p
+# as: -32 -march=mips64r6
+
+.*:.*file format.*elf.*mips.*
+private flags = a.......: .*\[mips64r6\].*
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS64r6
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+       None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
index 855e2cd8c9969aa94cc79668379514e0a09a4ee9..b0de13a9059bcb18f233d36d57f7ad70ee90d9ce 100644 (file)
@@ -870,10 +870,12 @@ if { [istarget mips*-*-vxworks*] } {
     run_dump_test "elf_arch_mips32r2"
     run_dump_test "elf_arch_mips32r3"
     run_dump_test "elf_arch_mips32r5"
+    run_dump_test "elf_arch_mips32r6"
     run_dump_test "elf_arch_mips64"
     run_dump_test "elf_arch_mips64r2"
     run_dump_test "elf_arch_mips64r3"
     run_dump_test "elf_arch_mips64r5"
+    run_dump_test "elf_arch_mips64r6"
 
     # Verify that ASE markings are handled properly.
     run_dump_test "elf_ase_mips16"
index 54afd1c135a9984df7042b88a9b599974e4063fb..ce0bc74585263111b0c7d345d32af983fc5af7c1 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-05  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * ld-mips-elf/abiflags-strip10-ph.d: New file.
+       * ld-mips-elf/mips-eld.exp: Run the new test.
+
 2014-10-30  Will Newton  <will.newton@linaro.org>
 
        * ld-unique/unique.exp: Use a wider glob for matching ARM
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip10-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip10-ph.d
new file mode 100644 (file)
index 0000000..ea403af
--- /dev/null
@@ -0,0 +1,27 @@
+#source: jr.s -mips32r6
+#source: jr.s -mips32r6 RUN_OBJCOPY
+#ld: -e 0
+#objcopy_objects: -R .MIPS.abiflags
+#objdump: -p
+
+[^:]*:     file format elf32-.*
+
+Program Header:
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+         filesz 0x00000018 memsz 0x00000018 flags r--
+#...
+private flags = 90001400: \[abi=O32\] \[mips32r6\] \[nan2008\] \[not 32bitmode\]
+
+MIPS ABI Flags Version: 0
+
+ISA: MIPS32r6
+GPR size: 32
+CPR1 size: 64
+CPR2 size: 0
+FP ABI: Hard float \(32-bit CPU, 64-bit FPU\)
+ISA Extension: None
+ASEs:
+       None
+FLAGS 1: 0000000.
+FLAGS 2: 00000000
+
index 92ab4b3f455c7807882a47e1cacbed12d5f2c9f9..91036de714809acbd24f531cc90867911ee3ec0d 100644 (file)
@@ -694,6 +694,7 @@ run_dump_test "abiflags-strip6-ph" $o32flagslist
 run_dump_test "abiflags-strip7-ph" $o32flagslist
 run_dump_test "abiflags-strip8-ph" $o32flagslist
 run_dump_test "abiflags-strip9-ph" $o32flagslist
+run_dump_test "abiflags-strip10-ph" $o32flagslist
 
 run_dump_test "nan-legacy"
 run_dump_test "nan-2008"