This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [arm] Rework soft-float flags


On Thu, 2004-11-18 at 14:23, Paul Brook wrote:
> The attached patch reworks how the arm backend handles the 
> soft-float/hard-float abi commandline options. The main aim is to allow 
> subtargets to default to the "softfp" abi (ie. soft-float calling convention 
> using hardware fp instructions).
> 
> Tested on arm-none-elf and checked that arm-linux still has the correct 
> default.
> Does this seem an ok way of doing things?
> 
> In particular I'm not sure if it's best to use TARGET_OPTIONS or add another 
> flag for TARGET_SWITCHES.  I chose TARGET_OPTIONS because then it's obvious 
> that it's just a commandline switch, and arm_float_abi should be used to 
> determine the ABI in use.
> 
> Paul
> 
> 2004-11-18  Paul Brook  <paul@codesourcery.com>
> 
>  * config/arm/arm.c (target_float_switch): New variable..
>  (arm_override_options): Use TARGET_DEFAULT_FLOAT_ABI and
>  target_float_switch.
>  * config/arm/arm.h (target_float_switch): Declare.
>  (ARM_FLAG_SOFT_FLOAT): Remove.
>  (TARGET_SWITCHES): Remove hard-float and soft-float.
>  (TARGET_OPTIONS): Add hard-float and soft-float.
>  (TARGET_DEFAULT_FLOAT_ABI): Define.
>  * config/arm/coff.h (TARGET_DEFAULT_FLOAT_ABI): Define
>  (TARGET_DEFAULT): Don't set ARM_FLAG_SOFT_FLOAT.
>  * config/arm/elf.h: Ditto.
>  * config/arm/linux-elf.h: Ditto.
>  * config/arm/netbsd-elf.h: Ditto.
>  * config/arm/netbsd.h: Ditto.
>  * config/arm/pe.h: Ditto.
>  * config/arm/semi.h: Ditto.
>  * config/arm/semiaof.h: Ditto.
>  * config/arm/uclinux-elf.h: Ditto.
>  * config/arm/unknown-elf.h: Ditto.
>  * config/arm/wince-pe.h: Ditto.

Looks fine to me.

The one change I would probably make is to move the default setting of
TARGET_DEFAULT_FLOAT_ABI to arm.h (making it ARM_FLOAT_ABI_SOFT).  Then
the number of places that needs to override the default goes down
significantly.

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]