diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2019-04-01 10:43:32 +0100 |
---|---|---|
committer | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2019-04-01 10:43:32 +0100 |
commit | 34ef62f46541d423b991850b2b7ba34d8749a6ba (patch) | |
tree | 79824aa5fb2396b92bbe93ff81c4c124717d6a8e /include | |
parent | 52093e1b936fa4f3f8bb3868c5a44d0df25c8db4 (diff) | |
download | gdb-34ef62f46541d423b991850b2b7ba34d8749a6ba.zip gdb-34ef62f46541d423b991850b2b7ba34d8749a6ba.tar.gz gdb-34ef62f46541d423b991850b2b7ba34d8749a6ba.tar.bz2 |
[GAS, Arm] CLI with architecture sensitive extensions
This patch adds a new framework to add architecture sensitive extensions, like
GCC does. This patch also implements all architecture extensions currently
available in GCC.
This framework works as follows. To enable architecture sensitive extensions
for a particular architecture, that architecture must contain an ARM_ARCH_OPT2
entry in the 'arm_archs' table. All fields here are the same as previous, with
the addition of a new extra field at the end to <name> it's extension table.
This <name>, corresponds to a <name>_ext_table of type 'struct arm_ext_table'.
This struct can be filled with three types of entries:
ARM_ADD (string <ext>, arm_feature_set <enable_bits>), which means +<ext> will
enable <enable_bits>
ARM_REMOVE (string <ext>, arm_feature_set <disable_bits>), which means
+no<ext> will disable <disable_bits>
ARM_EXT (string <ext>, arm_feature_set <enable_bits>, arm_feature_set
<disable_bits>), which means +<ext> will enable <enable_bits> and +no<ext>
will disable <disable_bits> (this is to be used instead of adding an
ARM_ADD and ARM_REMOVE for the same <ext>)
This patch does not disable the use of the old extensions, even if some of them
are duplicated in the new tables. This is a "in-between-step" as we may want to
deprecate the old table of extensions in later patches. For now, GAS will first
look for the +<ext> or +no<ext> in the new table and if no entry is found it
will continue searching in the old table, following old behaviour. If only an
ARM_ADD or an ARM_REMOVE is defined for <ext> and +no<ext> or +<ext> resp. is
used then it also continues to search the old table for it.
A couple of caveats:
- This patch does not enable the use of these architecture extensions with the
'.arch_extension' directive. This is future work that I will tend to later.
- This patch does not enable the use of these architecture extensions with the
-mcpu option. This is future work that I will tend to later.
- This patch does not change the current behaviour when combining an
architecture extension and using -mfpu on the command-line. The current
behaviour of GAS is to stage the union of feature bits enabled by both -march
and -mfpu. GCC behaves differently here, so this is something we may want to
revisit on a later date.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 11 | ||||
-rw-r--r-- | include/opcode/arm.h | 31 |
2 files changed, 35 insertions, 7 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index f6662f7..c1639b8 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,14 @@ +2019-04-01 Andre Vieira <andre.simoesdiasvieira@arm.com> + + * opcode/arm.h (FPU_NEON_ARMV8_1): New. + (FPU_ARCH_NEON_VFP_ARMV8_1): Use FPU_NEON_ARMV8_1. + (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1): Likewise. + (FPU_ARCH_DOTPROD_NEON_VFP_ARMV8): Likewise. + (FPU_ARCH_NEON_VFP_ARMV8_2_FP16): New. + (FPU_ARCH_NEON_VFP_ARMV8_2_FP16FML): New. + (FPU_ARCH_NEON_VFP_ARMV8_4_FP16FML): New. + (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_4): New. + 2019-03-28 Alan Modra <amodra@gmail.com> PR 24390 diff --git a/include/opcode/arm.h b/include/opcode/arm.h index 5888330..4f5c89f 100644 --- a/include/opcode/arm.h +++ b/include/opcode/arm.h @@ -205,6 +205,7 @@ | FPU_VFP_EXT_ARMV8xD) #define FPU_NEON_ARMV8 (FPU_NEON_EXT_V1 | FPU_NEON_EXT_FMA \ | FPU_NEON_EXT_ARMV8) +#define FPU_NEON_ARMV8_1 (FPU_NEON_ARMV8 | FPU_NEON_EXT_RDMA) #define FPU_CRYPTO_ARMV8 (FPU_CRYPTO_EXT_ARMV8) #define FPU_VFP_HARD (FPU_VFP_EXT_V1xD | FPU_VFP_EXT_V1 \ | FPU_VFP_EXT_V2 \ @@ -264,19 +265,35 @@ | FPU_NEON_EXT_DOTPROD) #define ARCH_CRC_ARMV8 ARM_FEATURE_COPROC (CRC_EXT_ARMV8) #define FPU_ARCH_NEON_VFP_ARMV8_1 \ - ARM_FEATURE_COPROC (FPU_NEON_ARMV8 \ - | FPU_VFP_ARMV8 \ - | FPU_NEON_EXT_RDMA) + ARM_FEATURE_COPROC (FPU_NEON_ARMV8_1 \ + | FPU_VFP_ARMV8) #define FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1 \ ARM_FEATURE_COPROC (FPU_CRYPTO_ARMV8 \ - | FPU_NEON_ARMV8 \ - | FPU_VFP_ARMV8 \ - | FPU_NEON_EXT_RDMA) + | FPU_NEON_ARMV8_1 \ + | FPU_VFP_ARMV8) + #define FPU_ARCH_DOTPROD_NEON_VFP_ARMV8 \ ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD \ - | FPU_NEON_ARMV8 \ + | FPU_NEON_ARMV8_1 \ | FPU_VFP_ARMV8) +#define FPU_ARCH_NEON_VFP_ARMV8_2_FP16 \ + ARM_FEATURE (0, ARM_EXT2_FP16_INST, \ + FPU_NEON_ARMV8_1 | FPU_VFP_ARMV8) + +#define FPU_ARCH_NEON_VFP_ARMV8_2_FP16FML \ + ARM_FEATURE (0, ARM_EXT2_FP16_INST | ARM_EXT2_FP16_FML, \ + FPU_NEON_ARMV8_1 | FPU_VFP_ARMV8) + +#define FPU_ARCH_NEON_VFP_ARMV8_4_FP16FML \ + ARM_FEATURE (0, ARM_EXT2_FP16_INST | ARM_EXT2_FP16_FML, \ + FPU_NEON_ARMV8_1 | FPU_VFP_ARMV8 | FPU_NEON_EXT_DOTPROD) + +#define FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_4 \ + ARM_FEATURE_COPROC (FPU_CRYPTO_ARMV8 \ + | FPU_NEON_ARMV8_1 \ + | FPU_VFP_ARMV8 \ + | FPU_NEON_EXT_DOTPROD) #define FPU_ARCH_ENDIAN_PURE ARM_FEATURE_COPROC (FPU_ENDIAN_PURE) |