diff options
author | Sheldon Lobo <sheldon.lobo@oracle.com> | 2017-02-23 07:49:37 -0800 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2017-02-23 07:53:16 -0800 |
commit | 1e9d41d49f7f0b9e7381e8bf8ce848f8a33b8fde (patch) | |
tree | c8858a8766718c47ed5e890c67434e499bb04278 /include | |
parent | 8eaf53202ea60191162d5f1069cd08ebd9f38f6c (diff) | |
download | gdb-1e9d41d49f7f0b9e7381e8bf8ce848f8a33b8fde.zip gdb-1e9d41d49f7f0b9e7381e8bf8ce848f8a33b8fde.tar.gz gdb-1e9d41d49f7f0b9e7381e8bf8ce848f8a33b8fde.tar.bz2 |
opcodes,gas: associate SPARC ASIs with an architecture level.
With this change an architecture level bump due to assembly ASIs will show
up as a warning/error depending on options passed to gas.
Tested with sparc64-linux-gnu, and it does not introduce any regressions.
gas/ChangeLog:
Add support for associating SPARC ASIs with an architecture level.
* config/tc-sparc.c (parse_sparc_asi): New encode SPARC ASIs.
opcodes/ChangeLog:
Add support for associating SPARC ASIs with an architecture level.
* include/opcode/sparc.h (sparc_asi): New sparc_asi struct.
* opcodes/sparc-opc.c (asi_table): Updated asi_table and encoding/
decoding of SPARC ASIs.
Diffstat (limited to 'include')
-rw-r--r-- | include/opcode/sparc.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/opcode/sparc.h b/include/opcode/sparc.h index c79f20d..6e8d6d7 100644 --- a/include/opcode/sparc.h +++ b/include/opcode/sparc.h @@ -117,6 +117,14 @@ typedef struct sparc_opcode short architecture; /* Bitmask of sparc_opcode_arch_val's. */ } sparc_opcode; +/* Struct for ASIs - to handle ASIs introduced in a specific architecture */ +typedef struct +{ + int value; + const char *name; + short architecture; +} sparc_asi; + /* FIXME: Add F_ANACHRONISTIC flag for v9. */ #define F_DELAYED 0x00000001 /* Delayed branch. */ #define F_ALIAS 0x00000002 /* Alias for a "real" instruction. */ @@ -296,7 +304,7 @@ typedef struct sparc_opcode extern const struct sparc_opcode sparc_opcodes[]; extern const int sparc_num_opcodes; -extern int sparc_encode_asi (const char *); +extern const sparc_asi *sparc_encode_asi (const char *); extern const char *sparc_decode_asi (int); extern int sparc_encode_membar (const char *); extern const char *sparc_decode_membar (int); |