OSDN Git Service

Support PowerPC single-precision float.
authorAlan Modra <amodra@bigpond.net.au>
Sat, 26 Jul 2008 13:10:47 +0000 (13:10 +0000)
committerAlan Modra <amodra@bigpond.net.au>
Sat, 26 Jul 2008 13:10:47 +0000 (13:10 +0000)
bfd/ChangeLog
bfd/elf32-ppc.c
include/elf/ChangeLog
include/elf/ppc.h

index 23b8d93..02dbbb1 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-26  Michael Eager <eager@eagercon.com>
+
+       * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility
+       between single-float, double-float, and soft-float.
+
 2008-07-24  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * elf32-mips.c (elf_backend_write_section): Define.
index 92f812f..22b90b2 100644 (file)
@@ -3883,10 +3883,22 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
       else if (out_attr->i == 1 && in_attr->i == 2)
        _bfd_error_handler
          (_("Warning: %B uses hard float, %B uses soft float"), obfd, ibfd);
-      else if (out_attr->i == 2 && in_attr->i == 1)
+      else if (out_attr->i == 1 && in_attr->i == 3)
+       _bfd_error_handler
+         (_("Warning: %B uses double-precision hard float, %B uses single-precision hard float"), 
+         obfd, ibfd);
+      else if (out_attr->i == 3 && in_attr->i == 1)
+       _bfd_error_handler
+         (_("Warning: %B uses double-precision hard float, %B uses single-precision hard float"), 
+         ibfd, obfd);
+      else if (out_attr->i == 3 && in_attr->i == 2)
+       _bfd_error_handler
+         (_("Warning: %B uses soft float, %B uses single-precision hard float"), 
+         ibfd, obfd);
+      else if (out_attr->i == 2 && (in_attr->i == 1 || in_attr->i == 3))
        _bfd_error_handler
          (_("Warning: %B uses hard float, %B uses soft float"), ibfd, obfd);
-      else if (in_attr->i > 2)
+      else if (in_attr->i > 3)
        _bfd_error_handler
          (_("Warning: %B uses unknown floating point ABI %d"), ibfd,
           in_attr->i);
index 71a54cd..62bce3e 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-26  Michael Eager <eager@eagercon.com>
+
+       * ppc.h: Add description of single-precision.
+
 2008-07-21  Luis Machado  <luisgpm@br.ibm.com>
 
        * common.h: Define NT_PPC_VSX.
index 5d4462b..95cccce 100644 (file)
@@ -1,5 +1,5 @@
 /* PPC ELF support for BFD.
-   Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005
+   Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2008
    Free Software Foundation, Inc.
 
    By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
@@ -177,7 +177,8 @@ enum
 {
   /* 0-3 are generic.  */
   Tag_GNU_Power_ABI_FP = 4, /* Value 1 for hard-float, 2 for
-                              soft-float; 0 for not tagged or not
+                              soft-float, 3 for single=precision 
+                              hard-float; 0 for not tagged or not
                               using any ABIs affected by the
                               differences.  */