This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix arm-eabi attributes
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: binutils <binutils at sources dot redhat dot com>
- Date: Thu, 30 Apr 2009 15:24:01 +0100
- Subject: Fix arm-eabi attributes
This patch fixes a latent problem with arm eabi attributes. We triggered off
TE_LINUX when defaulting the FPU, thus leading to a lack of default for plain
arm-eabi, leading to incorrect object files.
this patch changes the assembler to
*) default to plain VFP for eabi configs. There's no requirement for it to be V2.
*) Check EABI_DEFAULT's existance when defaulting the fpu.
the testsuite tweaks are
*) force neon where we need it
*) correct a previously incorrect .double encoding, which was an outcome of
incorrectly tagged object.
tested on arm-eabi and arm-linux-gnueabi. ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
2009-04-30 Nathan Sidwell <nathan@codesourcery.com>
* config/tc-armlinux-eabi.h (FPU_DEFAULT): Default to plain VFP.
* config/tc-armeabi.h (FPU_DEFAULT): Likewise.
* config/tc-arm.c (md_begin): If FPU_DEFAULT is set, don't infer
the default FPU from the processor.
2009-04-30 Nathan Sidwell <nathan@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gas/arm/attr-mcpu.d: Add -mfpu=neon.
* gas/arm/mapmisc.d: Correct expected output for .double and
.dcb.d.
Index: config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.381
diff -c -3 -p -r1.381 tc-arm.c
*** config/tc-arm.c 2 Apr 2009 09:43:56 -0000 1.381
--- config/tc-arm.c 30 Apr 2009 14:12:28 -0000
*************** md_begin (void)
*** 20267,20273 ****
}
else if (!mfpu_opt)
{
! #if !(defined (TE_LINUX) || defined (TE_NetBSD) || defined (TE_VXWORKS))
/* Some environments specify a default FPU. If they don't, infer it
from the processor. */
if (mcpu_fpu_opt)
--- 20267,20273 ----
}
else if (!mfpu_opt)
{
! #if !(defined (EABI_DEFAULT) || defined (TE_NetBSD) || defined (TE_VXWORKS))
/* Some environments specify a default FPU. If they don't, infer it
from the processor. */
if (mcpu_fpu_opt)
Index: config/te-armeabi.h
===================================================================
RCS file: /cvs/src/src/gas/config/te-armeabi.h,v
retrieving revision 1.3
diff -c -3 -p -r1.3 te-armeabi.h
*** config/te-armeabi.h 16 Jan 2009 11:38:14 -0000 1.3
--- config/te-armeabi.h 30 Apr 2009 14:12:28 -0000
***************
*** 18,24 ****
02110-1301, USA. */
/* The EABI requires the use of VFP. */
! #define FPU_DEFAULT FPU_ARCH_VFP_V2
#define EABI_DEFAULT EF_ARM_EABI_VER5
#define LOCAL_LABELS_DOLLAR 1
--- 18,24 ----
02110-1301, USA. */
/* The EABI requires the use of VFP. */
! #define FPU_DEFAULT FPU_ARCH_VFP
#define EABI_DEFAULT EF_ARM_EABI_VER5
#define LOCAL_LABELS_DOLLAR 1
Index: config/te-armlinuxeabi.h
===================================================================
RCS file: /cvs/src/src/gas/config/te-armlinuxeabi.h,v
retrieving revision 1.4
diff -c -3 -p -r1.4 te-armlinuxeabi.h
*** config/te-armlinuxeabi.h 16 Jan 2009 11:38:14 -0000 1.4
--- config/te-armlinuxeabi.h 30 Apr 2009 14:12:28 -0000
***************
*** 20,24 ****
#include "te-linux.h"
/* The EABI requires the use of VFP. */
! #define FPU_DEFAULT FPU_ARCH_VFP_V2
#define EABI_DEFAULT EF_ARM_EABI_VER5
--- 20,24 ----
#include "te-linux.h"
/* The EABI requires the use of VFP. */
! #define FPU_DEFAULT FPU_ARCH_VFP
#define EABI_DEFAULT EF_ARM_EABI_VER5
Index: testsuite/gas/arm/attr-mcpu.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/attr-mcpu.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 attr-mcpu.d
*** testsuite/gas/arm/attr-mcpu.d 27 Jan 2009 15:20:11 -0000 1.2
--- testsuite/gas/arm/attr-mcpu.d 30 Apr 2009 14:12:29 -0000
***************
*** 1,6 ****
# name: EABI attributes from command line
# source: blank.s
! # as: -mcpu=cortex-a8
# readelf: -A
# This test is only valid on EABI based ports.
# target: *-*-*eabi
--- 1,6 ----
# name: EABI attributes from command line
# source: blank.s
! # as: -mcpu=cortex-a8 -mfpu=neon
# readelf: -A
# This test is only valid on EABI based ports.
# target: *-*-*eabi
Index: testsuite/gas/arm/mapmisc.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/mapmisc.d,v
retrieving revision 1.1
diff -c -3 -p -r1.1 mapmisc.d
*** testsuite/gas/arm/mapmisc.d 5 Mar 2009 15:27:59 -0000 1.1
--- testsuite/gas/arm/mapmisc.d 30 Apr 2009 14:12:29 -0000
***************
*** 1,4 ****
! #as: -EL -I$srcdir/$subdir
#objdump: --syms --special-syms -d
#name: ARM Mapping Symbols for miscellaneous directives
# This test is only valid on EABI based ports.
--- 1,4 ----
! #as: -EL -I$srcdir/$subdir -mfpu=neon
#objdump: --syms --special-syms -d
#name: ARM Mapping Symbols for miscellaneous directives
# This test is only valid on EABI based ports.
*************** Disassembly of section .text:
*** 74,84 ****
50: e1a00000 nop \(mov r0,r0\)
54: 40200000 .word 0x40200000
58: e1a00000 nop \(mov r0,r0\)
! 5c: 400c0000 .word 0x400c0000
! 60: 00000000 .word 0x00000000
64: e1a00000 nop \(mov r0,r0\)
! 68: 40120000 .word 0x40120000
! 6c: 00000000 .word 0x00000000
70: e1a00000 nop \(mov r0,r0\)
74: 00000004 .word 0x00000004
78: 00000004 .word 0x00000004
--- 74,84 ----
50: e1a00000 nop \(mov r0,r0\)
54: 40200000 .word 0x40200000
58: e1a00000 nop \(mov r0,r0\)
! 5c: 00000000 .word 0x00000000
! 60: 400c0000 .word 0x400c0000
64: e1a00000 nop \(mov r0,r0\)
! 68: 00000000 .word 0x00000000
! 6c: 40120000 .word 0x40120000
70: e1a00000 nop \(mov r0,r0\)
74: 00000004 .word 0x00000004
78: 00000004 .word 0x00000004