[arm] Allow more CPU feature flags
Paul Brook
paul@codesourcery.com
Mon Jan 30 23:39:00 GMT 2006
The Arm gas backend uses a bitmask to keep track of the different instruction
sets. This is currently a "long" integer, and almost all the bits have been
used. I'm going to be adding several new architecture variants in the near
future, so need more bits.
The attached patch changes the feature flags from a long to a struct. The main
complication is that we want to use these flags both both static initialisers
and for testing features at runtime. This is solved by introducing a bunch of
new static variables in tc-arm.c.
The patch is bases on an original Patch by Richard Earnshaw:
http://sourceware.org/ml/binutils/2005-03/msg00352.html
Tested with cross to arm-none-eabi
Ok?
Paul
2006-01-30 Paul Brook <paul@codesourcery.com>
Richard Earnshaw <rearnsha@arm.com>
* gas/config/tc-arm.c: Use arm_feature_set.
(arm_ext_*, arm_arch_full, arm_arch_t2, arm_arch_none,
arm_cext_iwmmxt, arm_cext_xscale, arm_cext_maverick, fpu_fpa_ext_v1,
fpu_fpa_ext_v2, fpu_vfp_ext_v1xd, fpu_vfp_ext_v1, fpu_vfp_ext_v2):
New variables.
(insns): Use them.
(md_atof, opcode_select, opcode_select, md_assemble, md_assemble,
md_begin, arm_parse_extension, arm_parse_cpu, arm_parse_arch,
arm_parse_fpu, arm_parse_float_abi, aeabi_set_public_attributes,
s_arm_cpu, s_arm_arch, s_arm_fpu): Use macros for accessing CPU
feature flags.
(arm_legacy_option_table, arm_option_cpu_value_table): New types.
(arm_opts): Move old cpu/arch options from here...
(arm_legacy_opts): ... to here.
(md_parse_option): Search arm_legacy_opts.
(arm_cpus, arm_archs, arm_extensions, arm_fpus)
(arm_float_abis, arm_eabis): Make const.
* include/opcode/arm.h: Use ARM_CPU_FEATURE.
(ARM_AEXT_*, FPU_ENDIAN_PURE, FPU_VFP_HARD): New.
(arm_feature_set): Change to a structure.
(ARM_CPU_HAS_FEATURE, ARM_MERGE_FEATURE_SETS, ARM_CLEAR_FEATURE,
ARM_FEATURE): New macros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.gas_arm_flags
Type: text/x-diff
Size: 62544 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060130/a0f242da/attachment.bin>
More information about the Binutils
mailing list