diff options
author | Anton Kolesov <Anton.Kolesov@synopsys.com> | 2017-04-07 17:22:39 +0300 |
---|---|---|
committer | Anton Kolesov <Anton.Kolesov@synopsys.com> | 2017-05-30 16:52:28 +0300 |
commit | 940171d08654a9ff5bf9b8886f76e8189a02cf09 (patch) | |
tree | d16f8581c7549ec2193ab435ce8a0ebf39f9674e /gas | |
parent | 64984c22f7045d53590f816e7ba0b9b9fa1dbbe7 (diff) | |
download | gdb-940171d08654a9ff5bf9b8886f76e8189a02cf09.zip gdb-940171d08654a9ff5bf9b8886f76e8189a02cf09.tar.gz gdb-940171d08654a9ff5bf9b8886f76e8189a02cf09.tar.bz2 |
[ARC] Add arc-cpu.def with processor definitions
This patch extracts ARC CPU definitions from gas/config/tc-arc.c (cpu_types)
into a separate file arc-cpu.def. This will allow reuse of CPU type definition
in multiple places where it might be needed, for example in disassembler. This
will help ensure that gas and disassembker use same option values for CPUs.
arc-cpu.def file relies on preprocessor macroses which are defined somewhere
else. This for example multiple C files to include arc-cpu.def, but define
different macroses, therefore creating different structures.
include/ChangeLog:
yyyy-mm-dd Anton Kolesov <anton.kolesov@synopsys.com>
* elf/arc-cpu.def: New file.
gas/ChangeLog:
yyyy-mm-dd Anton Kolesov <anton.kolesov@synopsys.com>
* config/tc-arc.c (cpu_types): Include arc-cpu.def
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-arc.c | 29 |
2 files changed, 7 insertions, 26 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2e7bb8d..d8b9d2e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com> + + * config/tc-arc.c (cpu_types): Include arc-cpu.def + 2017-05-23 H.J. Lu <hongjiu.lu@intel.com> * gas/testsuite/gas/i386/notrackbad.l: Updated for non-ELF diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index 173a1a0..55aaf07 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -445,6 +445,8 @@ static struct hash_control *arc_addrtype_hash; #define ARC_CPU_TYPE_AV2HS(NAME,EXTRA) \ { #NAME, ARC_OPCODE_ARCv2HS, bfd_mach_arc_arcv2, \ EF_ARC_CPU_ARCV2HS, EXTRA} +#define ARC_CPU_TYPE_NONE \ + { 0, 0, 0, 0, 0 } /* A table of CPU names and opcode sets. */ static const struct cpu_type @@ -457,32 +459,7 @@ static const struct cpu_type } cpu_types[] = { - ARC_CPU_TYPE_A7xx (arc700, 0x00), - ARC_CPU_TYPE_A7xx (nps400, NPS400), - - ARC_CPU_TYPE_AV2EM (arcem, 0x00), - ARC_CPU_TYPE_AV2EM (em, 0x00), - ARC_CPU_TYPE_AV2EM (em4, CD), - ARC_CPU_TYPE_AV2EM (em4_dmips, CD), - ARC_CPU_TYPE_AV2EM (em4_fpus, CD), - ARC_CPU_TYPE_AV2EM (em4_fpuda, CD | DPA), - ARC_CPU_TYPE_AV2EM (quarkse_em, CD | SPX | DPX), - - ARC_CPU_TYPE_AV2HS (archs, CD), - ARC_CPU_TYPE_AV2HS (hs, CD), - ARC_CPU_TYPE_AV2HS (hs34, CD), - ARC_CPU_TYPE_AV2HS (hs38, CD), - ARC_CPU_TYPE_AV2HS (hs38_linux, CD), - - ARC_CPU_TYPE_A6xx (arc600, 0x00), - ARC_CPU_TYPE_A6xx (arc600_norm, 0x00), - ARC_CPU_TYPE_A6xx (arc600_mul64, 0x00), - ARC_CPU_TYPE_A6xx (arc600_mul32x16, 0x00), - ARC_CPU_TYPE_A6xx (arc601, 0x00), - ARC_CPU_TYPE_A6xx (arc601_norm, 0x00), - ARC_CPU_TYPE_A6xx (arc601_mul64, 0x00), - ARC_CPU_TYPE_A6xx (arc601_mul32x16, 0x00), - { 0, 0, 0, 0, 0 } + #include "elf/arc-cpu.def" }; /* Information about the cpu/variant we're assembling for. */ |