diff options
author | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-01-16 13:01:54 +0000 |
---|---|---|
committer | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-01-16 13:01:54 +0000 |
commit | 96a846ea2324acd8d167080c146ebea148453aeb (patch) | |
tree | 6fe0aa593bca57203508ce354853b969072efc3a | |
parent | ca4ebd1e04f9dec885ddc5b2499c99efbbf8eb8f (diff) | |
download | gdb-96a846ea2324acd8d167080c146ebea148453aeb.zip gdb-96a846ea2324acd8d167080c146ebea148453aeb.tar.gz gdb-96a846ea2324acd8d167080c146ebea148453aeb.tar.bz2 |
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
EF_ARM_VFP_FLOAT.
(elf32_arm_print_private_bfd_data): Likewise.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-arm.h | 49 |
2 files changed, 46 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cb50b2a..f72c429 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-01-16 Richard Earnshaw <rearnsha@arm.com> + + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle + EF_ARM_VFP_FLOAT. + (elf32_arm_print_private_bfd_data): Likewise. + 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com> * po/tr.po: Import new version. diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 9d0a405..ab8a6b3 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -2297,22 +2297,47 @@ Error: %s passes floats in integer registers, whereas %s passes them in FP regis flags_compatible = false; } -#ifdef EF_ARM_SOFT_FLOAT - if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT)) + if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT)) { - if (in_flags & EF_ARM_SOFT_FLOAT) - _bfd_error_handler (_ ("\ -Error: %s uses software FP, whereas %s uses hardware FP"), + if (in_flags & EF_ARM_VFP_FLOAT) + _bfd_error_handler (_("\ +Error: %s uses VFP instructions, whereas %s FPA instructions"), bfd_archive_filename (ibfd), bfd_get_filename (obfd)); else - _bfd_error_handler (_ ("\ -Error: %s uses hardware FP, whereas %s uses software FP"), + _bfd_error_handler (_("\ +Error: %s uses FPA instructions, whereas %s VFP instructions"), bfd_archive_filename (ibfd), bfd_get_filename (obfd)); flags_compatible = false; } + +#ifdef EF_ARM_SOFT_FLOAT + if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT)) + { + /* We can allow interworking between code that is VFP format + layout, and uses either soft float or integer regs for + passing floating point arguments and results. We already + know that the APCS_FLOAT flags match; similarly for VFP + flags. */ + if ((in_flags & EF_ARM_APCS_FLOAT) != 0 + || (in_flags & EF_ARM_VFP_FLOAT) == 0) + { + if (in_flags & EF_ARM_SOFT_FLOAT) + _bfd_error_handler (_ ("\ +Error: %s uses software FP, whereas %s uses hardware FP"), + bfd_archive_filename (ibfd), + bfd_get_filename (obfd)); + else + _bfd_error_handler (_ ("\ +Error: %s uses hardware FP, whereas %s uses software FP"), + bfd_archive_filename (ibfd), + bfd_get_filename (obfd)); + + flags_compatible = false; + } + } #endif /* Interworking mismatch is only a warning. */ @@ -2374,6 +2399,11 @@ elf32_arm_print_private_bfd_data (abfd, ptr) else fprintf (file, _(" [APCS-32]")); + if (flags & EF_ARM_VFP_FLOAT) + fprintf (file, _(" [VFP float format]")); + else + fprintf (file, _(" [FPA float format]")); + if (flags & EF_ARM_APCS_FLOAT) fprintf (file, _(" [floats passed in float registers]")); @@ -2389,8 +2419,9 @@ elf32_arm_print_private_bfd_data (abfd, ptr) if (flags & EF_ARM_SOFT_FLOAT) fprintf (file, _(" [software FP]")); - flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT | EF_ARM_PIC - | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI | EF_ARM_SOFT_FLOAT); + flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT + | EF_ARM_PIC | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI + | EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT); break; case EF_ARM_EABI_VER1: |