[ld/testsuite/ChangeLog]
authorThiemo Seufer <ths@networkno.de>
Sat, 17 Nov 2007 13:38:57 +0000 (13:38 +0000)
committerThiemo Seufer <ths@networkno.de>
Sat, 17 Nov 2007 13:38:57 +0000 (13:38 +0000)
* ld-mips-elf/attr-gnu-4-14.d, ld-mips-elf/attr-gnu-4-41.d:
Adjust warning message for -mfp64 flag.
* ld-mips-elf/attr-gnu-4-5.s, ld-mips-elf/attr-gnu-4-04.d,
ld-mips-elf/attr-gnu-4-51.d, ld-mips-elf/attr-gnu-4-05.d,
ld-mips-elf/attr-gnu-4-15.d, ld-mips-elf/attr-gnu-4-24.d,
ld-mips-elf/attr-gnu-4-25.d, ld-mips-elf/attr-gnu-4-34.d,
ld-mips-elf/attr-gnu-4-35.d, ld-mips-elf/attr-gnu-4-42.d,
ld-mips-elf/attr-gnu-4-43.d, ld-mips-elf/attr-gnu-4-44.d,
ld-mips-elf/attr-gnu-4-45.d, ld-mips-elf/attr-gnu-4-40.d,
ld-mips-elf/attr-gnu-4-14.d: New testcases files.
* ld-mips-elf/mips-elf.exp: Run new testcases.

[binutils/ChangeLog]
* readelf.c (display_mips_gnu_attribute): Recognize -mips32r2 -mfp64
objects.

[include/ChangeLog]
* elf/mips.h (Tag_GNU_MIPS_ABI_FP): Mention -mips32r2 -mfp64 variant
in comment.

[bfd/ChangeLog]
* elfxx-mips.c (mips_elf_merge_obj_attributes): Handle -mips32r2
-mfp64 attribute.

[gas/ChangeLog]
* doc/as.texinfo: Document the new attribute value.

26 files changed:
bfd/ChangeLog
bfd/elfxx-mips.c
binutils/ChangeLog
binutils/readelf.c
gas/ChangeLog
gas/doc/as.texinfo
include/ChangeLog
include/elf/mips.h
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/attr-gnu-4-04.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-05.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-14.d
ld/testsuite/ld-mips-elf/attr-gnu-4-15.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-24.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-25.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-34.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-35.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-40.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-41.d
ld/testsuite/ld-mips-elf/attr-gnu-4-42.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-43.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-44.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-45.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-5.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/attr-gnu-4-51.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips-elf.exp

index 07b29bdabf93789e65233e51b69bc84aaf8a7b9b..abdf1153eb7753868414aaba0599d593ebc8d3c8 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-17  Thiemo Seufer  <ths@mips.com>
+
+       * elfxx-mips.c (mips_elf_merge_obj_attributes): Handle -mips32r2
+       -mfp64 attribute.
+
 2007-11-16  Nick Clifton  <nickc@redhat.com>
 
        * elf-m10300.c (mn10300_elf_check_relocs): Fix memory leak and
index 470bed9e37ab2f23915b193c21dd28f0529f13b8..f674e1374f4692c547107c569a8c107bc6dc01ff 100644 (file)
@@ -11325,11 +11325,11 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
        out_attr[Tag_GNU_MIPS_ABI_FP].i = in_attr[Tag_GNU_MIPS_ABI_FP].i;
       else if (in_attr[Tag_GNU_MIPS_ABI_FP].i == 0)
        ;
-      else if (in_attr[Tag_GNU_MIPS_ABI_FP].i > 3)
+      else if (in_attr[Tag_GNU_MIPS_ABI_FP].i > 4)
        _bfd_error_handler
          (_("Warning: %B uses unknown floating point ABI %d"), ibfd,
           in_attr[Tag_GNU_MIPS_ABI_FP].i);
-      else if (out_attr[Tag_GNU_MIPS_ABI_FP].i > 3)
+      else if (out_attr[Tag_GNU_MIPS_ABI_FP].i > 4)
        _bfd_error_handler
          (_("Warning: %B uses unknown floating point ABI %d"), obfd,
           out_attr[Tag_GNU_MIPS_ABI_FP].i);
@@ -11351,6 +11351,12 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
                   obfd, ibfd);
                break;
 
+             case 4:
+               _bfd_error_handler
+                 (_("Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64"),
+                  obfd, ibfd);
+               break;
+
              default:
                abort ();
              }
@@ -11371,6 +11377,12 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
                   obfd, ibfd);
                break;
 
+             case 4:
+               _bfd_error_handler
+                 (_("Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64"),
+                  obfd, ibfd);
+               break;
+
              default:
                abort ();
              }
@@ -11381,6 +11393,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
              {
              case 1:
              case 2:
+             case 4:
                _bfd_error_handler
                  (_("Warning: %B uses hard float, %B uses soft float"),
                   ibfd, obfd);
@@ -11391,6 +11404,32 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
              }
            break;
 
+         case 4:
+           switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
+             {
+             case 1:
+               _bfd_error_handler
+                 (_("Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64"),
+                  ibfd, obfd);
+               break;
+
+             case 2:
+               _bfd_error_handler
+                 (_("Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64"),
+                  ibfd, obfd);
+               break;
+
+             case 3:
+               _bfd_error_handler
+                 (_("Warning: %B uses hard float, %B uses soft float"),
+                  obfd, ibfd);
+               break;
+
+             default:
+               abort ();
+             }
+           break;
+
          default:
            abort ();
          }
index a339f03727d201f4cf9fdf270addc613c2d4752d..fe2d1997760aa42dd53ce8d8022de82d8278aa82 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-17  Thiemo Seufer  <ths@mips.com>
+
+       * readelf.c (display_mips_gnu_attribute): Recognize -mips32r2 -mfp64
+       objects.
+
 2007-11-16  Nick Clifton  <nickc@redhat.com>
 
        * dwarf.c (process_extended_line_op): Add cases for HP extensions
index b1357f8550b09d43739f5a00e0f6724b7cdd38b4..41cf2bc2c340c9041b4603a699a81c61d912fc1c 100644 (file)
@@ -8833,6 +8833,9 @@ display_mips_gnu_attribute (unsigned char *p, int tag)
        case 3:
          printf ("Soft float\n");
          break;
+       case 4:
+         printf ("64-bit float (-mips32r2 -mfp64)\n");
+         break;
        default:
          printf ("??? (%d)\n", val);
          break;
index 1fc6f9a05459e276ac3730e05d561d046ad32679..0a182bf67b1596f2f18ec4152ddce230d6d0b473 100644 (file)
@@ -1,3 +1,7 @@
+2007-11-17  Thiemo Seufer  <ths@mips.com>
+
+       * doc/as.texinfo: Document the new attribute value.
+
 2007-11-16  Eric B. Weddington  <eric.weddington@atmel.com>
 
        * config/tc-avr.c (mcu_types): Add ATmega32HVB device.
index aa0c44d920c02539a0ec31240a004b711e3d8f0c..81c105a899e9d1b43d76c3443598882aefa9ec07 100644 (file)
@@ -6483,6 +6483,10 @@ FPU.
 2 for files using the hardware floating-point ABI with a single-precision FPU.
 @item
 3 for files using the software floating-point ABI.
+@item
+4 for files using the hardware floating-point ABI with 64-bit wide
+double-precision floating-point registers and 32-bit wide general
+purpose registers.
 @end itemize
 @end table
 
index 1bde4c5b6f674b09a5a3549720c916740fa75397..c8561216364dde926844f073503a92e2f78b9daf 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-17  Thiemo Seufer  <ths@mips.com>
+
+       * elf/mips.h (Tag_GNU_MIPS_ABI_FP): Mention -mips32r2 -mfp64 variant
+       in comment.
+
 2007-11-07  Joseph Myers  <joseph@codesourcery.com>
            Daniel Jacobowitz  <dan@codesourcery.com>
 
index 4f606757518672f61d4cfaf162df80321de1cac5..f54ef70ba6548f50a326300def981958bb565500 100644 (file)
@@ -1012,9 +1012,9 @@ enum
   /* 0-3 are generic.  */
   Tag_GNU_MIPS_ABI_FP = 4, /* Value 1 for hard-float -mdouble-float, 2
                              for hard-float -msingle-float, 3 for
-                             soft-float; 0 for not tagged or not
-                             using any ABIs affected by the
-                             differences.  */
+                             soft-float, 4 for -mips32r2 -mfp64; 0 for
+                             not tagged or not using any ABIs affected
+                             by the differences.  */
 };
 
 #endif /* _ELF_MIPS_H */
index 76ff53b020f268b1eaf0500a986152d58ab530f6..5d601f23c3e374ae86382ac7f2f81cd76bf2c122 100644 (file)
@@ -1,3 +1,17 @@
+2007-11-17  Thiemo Seufer  <ths@mips.com>
+
+       * ld-mips-elf/attr-gnu-4-14.d, ld-mips-elf/attr-gnu-4-41.d:
+       Adjust warning message for -mfp64 flag.
+       * ld-mips-elf/attr-gnu-4-5.s, ld-mips-elf/attr-gnu-4-04.d,
+       ld-mips-elf/attr-gnu-4-51.d, ld-mips-elf/attr-gnu-4-05.d,
+       ld-mips-elf/attr-gnu-4-15.d, ld-mips-elf/attr-gnu-4-24.d,
+       ld-mips-elf/attr-gnu-4-25.d, ld-mips-elf/attr-gnu-4-34.d,
+       ld-mips-elf/attr-gnu-4-35.d, ld-mips-elf/attr-gnu-4-42.d,
+       ld-mips-elf/attr-gnu-4-43.d, ld-mips-elf/attr-gnu-4-44.d,
+       ld-mips-elf/attr-gnu-4-45.d, ld-mips-elf/attr-gnu-4-40.d,
+       ld-mips-elf/attr-gnu-4-14.d: New testcases files.
+       * ld-mips-elf/mips-elf.exp: Run new testcases.
+
 2007-11-16  Nick Clifton  <nickc@redhat.com>
 
        * ld-mn10300/mn10300.exp: Fix the start address of the .bss
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-04.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-04.d
new file mode 100644 (file)
index 0000000..992ed04
--- /dev/null
@@ -0,0 +1,10 @@
+#source: attr-gnu-4-0.s
+#source: attr-gnu-4-4.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#readelf: -A
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: 64-bit float \(-mips32r2 -mfp64\)
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d
new file mode 100644 (file)
index 0000000..ebfc6d8
--- /dev/null
@@ -0,0 +1,10 @@
+#source: attr-gnu-4-0.s
+#source: attr-gnu-4-5.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#readelf: -A
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: \?\?\? \(5\)
index 7b15327d9921dc242ae7ef9e7b6771656fea82bc..e8993829547496e69112a97dab19efe953e41f63 100644 (file)
@@ -2,5 +2,5 @@
 #source: attr-gnu-4-4.s
 #as: -EB -32
 #ld: -r -melf32btsmip
-#warning: Warning: .* uses unknown floating point ABI 4
+#warning: Warning: .* uses -msingle-float, .* uses -mips32r2 -mfp64
 #target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d
new file mode 100644 (file)
index 0000000..cf32302
--- /dev/null
@@ -0,0 +1,11 @@
+#source: attr-gnu-4-1.s
+#source: attr-gnu-4-5.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses unknown floating point ABI 5
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: Hard float \(-mdouble-float\)
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-24.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-24.d
new file mode 100644 (file)
index 0000000..09e8175
--- /dev/null
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-2.s
+#source: attr-gnu-4-4.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mips32r2 -mfp64
+#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d
new file mode 100644 (file)
index 0000000..7701397
--- /dev/null
@@ -0,0 +1,11 @@
+#source: attr-gnu-4-2.s
+#source: attr-gnu-4-5.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses unknown floating point ABI 5
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: Hard float \(-msingle-float\)
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-34.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-34.d
new file mode 100644 (file)
index 0000000..2a9b0f3
--- /dev/null
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-3.s
+#source: attr-gnu-4-4.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses hard float, .* uses soft float
+#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d
new file mode 100644 (file)
index 0000000..c3ad25f
--- /dev/null
@@ -0,0 +1,11 @@
+#source: attr-gnu-4-3.s
+#source: attr-gnu-4-5.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#readelf: -A
+#warning: Warning: .* uses unknown floating point ABI 5
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: Soft float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d
new file mode 100644 (file)
index 0000000..f84e95b
--- /dev/null
@@ -0,0 +1,10 @@
+#source: attr-gnu-4-4.s
+#source: attr-gnu-4-0.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#readelf: -A
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: 64-bit float \(-mips32r2 -mfp64\)
index 5fffe75d566feeba5c6c88ffe8557e2c603d0da8..71f74a9737ae81b144edfe84b9e79adb7fc15a6d 100644 (file)
@@ -2,5 +2,5 @@
 #source: attr-gnu-4-1.s
 #as: -EB -32
 #ld: -r -melf32btsmip
-#warning: Warning: .* uses unknown floating point ABI 4
+#warning: Warning: .* uses -msingle-float, .* uses -mips32r2 -mfp64
 #target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-42.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-42.d
new file mode 100644 (file)
index 0000000..c095695
--- /dev/null
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-4.s
+#source: attr-gnu-4-2.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses -mips32r2 -mfp64
+#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-43.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-43.d
new file mode 100644 (file)
index 0000000..8396e38
--- /dev/null
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-4.s
+#source: attr-gnu-4-3.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses hard float, .* uses soft float
+#target: mips*-*-*
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-44.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-44.d
new file mode 100644 (file)
index 0000000..6e8cac2
--- /dev/null
@@ -0,0 +1,10 @@
+#source: attr-gnu-4-4.s
+#source: attr-gnu-4-4.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#readelf: -A
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: 64-bit float \(-mips32r2 -mfp64\)
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d
new file mode 100644 (file)
index 0000000..11738c5
--- /dev/null
@@ -0,0 +1,10 @@
+#source: attr-gnu-4-4.s
+#source: attr-gnu-4-5.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses unknown floating point ABI 5
+#target: mips*-*-*
+
+Attribute Section: gnu
+File Attributes
+  Tag_GNU_MIPS_ABI_FP: 64-bit float \(-mips32r2 -mfp64\)
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-5.s b/ld/testsuite/ld-mips-elf/attr-gnu-4-5.s
new file mode 100644 (file)
index 0000000..b21ec3b
--- /dev/null
@@ -0,0 +1 @@
+.gnu_attribute 4,5
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d
new file mode 100644 (file)
index 0000000..b5f1c22
--- /dev/null
@@ -0,0 +1,6 @@
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-1.s
+#as: -EB -32
+#ld: -r -melf32btsmip
+#warning: Warning: .* uses unknown floating point ABI 5
+#target: mips*-*-*
index 63af7338bb463a22ba95ce02486609189d2e67a9..fb32f5cc10d366becdc0397d0d50dcac5af8fba1 100644 (file)
@@ -290,17 +290,30 @@ run_dump_test "attr-gnu-4-00"
 run_dump_test "attr-gnu-4-01"
 run_dump_test "attr-gnu-4-02"
 run_dump_test "attr-gnu-4-03"
+run_dump_test "attr-gnu-4-04"
+run_dump_test "attr-gnu-4-05"
 run_dump_test "attr-gnu-4-10"
 run_dump_test "attr-gnu-4-11"
 run_dump_test "attr-gnu-4-12"
 run_dump_test "attr-gnu-4-13"
 run_dump_test "attr-gnu-4-14"
+run_dump_test "attr-gnu-4-15"
 run_dump_test "attr-gnu-4-20"
 run_dump_test "attr-gnu-4-21"
 run_dump_test "attr-gnu-4-22"
 run_dump_test "attr-gnu-4-23"
+run_dump_test "attr-gnu-4-24"
+run_dump_test "attr-gnu-4-25"
 run_dump_test "attr-gnu-4-30"
 run_dump_test "attr-gnu-4-31"
 run_dump_test "attr-gnu-4-32"
 run_dump_test "attr-gnu-4-33"
+run_dump_test "attr-gnu-4-34"
+run_dump_test "attr-gnu-4-35"
+run_dump_test "attr-gnu-4-40"
 run_dump_test "attr-gnu-4-41"
+run_dump_test "attr-gnu-4-42"
+run_dump_test "attr-gnu-4-43"
+run_dump_test "attr-gnu-4-44"
+run_dump_test "attr-gnu-4-45"
+run_dump_test "attr-gnu-4-51"