ARM FPU option handling cleanup
Paul Brook
paul@codesourcery.com
Thu Nov 5 14:36:00 GMT 2009
The attached patch cleans up the ARM FPU option handling. The current tangle
of macros checking for specific FPU variants is already somewhat unwieldy, and
gets significantly worse when trying to add new VFP variants.
I've replaced this with a table based lookup, which enumerates all relevant
details in a single place (arm.c:all_fpus). There should be no user-visible
changes.
Tested on arm-none-eabi, with basic spot checks of a legacy linux FPA based
target. Applied to SVN head.
Paul
2009-11-05 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_fp_model, arm_fpu_arch, arm_fpu_tune): Remove.
(arm_fpu_desc): New.
(all_fpus): Add FPU details.
(fp_model_for_fpu): Remove.
(arm_override_options): Set and use arm_fpu_desc and arm_fpu_attr.
(arm_output_epilogue, arm_save_coproc_regs): Use TARGET_FPA_EMU2.
(arm_file_start): Use arm_fpu_desc.
* config/arm/arm.h (TARGET_FPA, TARGET_MAVERICK, TARGET_VFP,
TARGET_VFPD32, TARGET_VFP3, TARGET_NEON_FP16, TARGET_NEON): Use
arm_fpu_desc.
(TARGET_FPA_EMU2): Define.
(arm_fp_model, fputype, arm_fpu_tune): Remove.
(vfp_reg_type, arm_fpu_desc): New.
* config/arm/arm.md (attr fpu): Simplify.
* config/arm/fpa.md (movxf_fpa): Use TARGET_FPA_EMU2.
* config/arm/linux-elf.h (FPUTYPE_DEFAULT): Use string value.
* config/arm/bpabi.h (FPUTYPE_DEFAULT): Use string value.
* config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Use string value.
* config/arm/vxworks.h (FPUTYPE_DEFAULT): Use string value.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 15883 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091105/a821c0ae/attachment.bin>
More information about the Gcc-patches
mailing list