diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-03-28 23:05:09 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-04-07 18:36:40 +0100 |
commit | a42a4f8400ee232ceed5ecceb61873195984f1d9 (patch) | |
tree | 5f158b39eca25d1464029f1a8fd3bd28d8a49670 /gas | |
parent | 1328504b287b2c284419d989e0d05e7d6d3ffa59 (diff) | |
download | gdb-a42a4f8400ee232ceed5ecceb61873195984f1d9.zip gdb-a42a4f8400ee232ceed5ecceb61873195984f1d9.tar.gz gdb-a42a4f8400ee232ceed5ecceb61873195984f1d9.tar.bz2 |
arc/nps400: Add new instructions
Add some new control instructions to the opcodes library, and a new test
for these new instructions to the assembler. The new instructions use
an instruction flag longer than any seen before (on arc), and so the max
flag length is extended to accommodate this.
gas/ChangeLog:
* config/tc-arc.h (MAX_FLAG_NAME_LENGTH): Increase to 7.
* testsuite/gas/arc/nps400-2.d: New file.
* testsuite/gas/arc/nps400-2.s: New file.
opcodes/ChangeLog:
* arc-nps400-tbl.h: Add schd, sync, and hwschd instructions.
* arc-opc.c (arc_flag_operands): Add new flags.
(arc_flag_classes): Add new classes.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-arc.h | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arc/nps400-2.d | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/arc/nps400-2.s | 16 |
4 files changed, 41 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index dc7cb01..342768f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2016-04-07 Andrew Burgess <andrew.burgess@embecosm.com> + * config/tc-arc.h (MAX_FLAG_NAME_LENGTH): Increase to 7. + * testsuite/gas/arc/nps400-2.d: New file. + * testsuite/gas/arc/nps400-2.s: New file. + +2016-04-07 Andrew Burgess <andrew.burgess@embecosm.com> + * config/tc-arc.c (struct arc_opcode_hash_entry_iterator): New structure. (arc_opcode_hash_entry_iterator_init): New function. diff --git a/gas/config/tc-arc.h b/gas/config/tc-arc.h index 7c193fe..076afea 100644 --- a/gas/config/tc-arc.h +++ b/gas/config/tc-arc.h @@ -211,7 +211,7 @@ extern int tc_arc_regname_to_dw2regnum (char *regname); #define NOP_OPCODE_S 0x000078E0 #define NOP_OPCODE_L 0x264A7000 /* mov 0,0. */ -#define MAX_FLAG_NAME_LENGTH 3 +#define MAX_FLAG_NAME_LENGTH 7 struct arc_flags { diff --git a/gas/testsuite/gas/arc/nps400-2.d b/gas/testsuite/gas/arc/nps400-2.d new file mode 100644 index 0000000..966907e --- /dev/null +++ b/gas/testsuite/gas/arc/nps400-2.d @@ -0,0 +1,18 @@ +#as: -mcpu=nps400 +#objdump: -dr + +.*: +file format .*arc.* + +Disassembly of section .text: + +[0-9a-f]+ <.*>: + 0: 3e6f 7004 schd\.rw + 4: 3e6f 7084 schd\.rd + 8: 3e6f 7044 schd\.wft + c: 3e6f 7144 schd\.wft\.ie1 + 10: 3e6f 7244 schd\.wft\.ie2 + 14: 3e6f 7344 schd\.wft\.ie12 + 18: 3e6f 703f sync\.rd + 1c: 3e6f 707f sync\.wr + 20: 3a6f 10bf hwschd\.off r10 + 24: 3e6f 7503 hwschd\.restore 0,r20 diff --git a/gas/testsuite/gas/arc/nps400-2.s b/gas/testsuite/gas/arc/nps400-2.s new file mode 100644 index 0000000..de4c839 --- /dev/null +++ b/gas/testsuite/gas/arc/nps400-2.s @@ -0,0 +1,16 @@ + .text + ;; schd + schd.rw + schd.rd + schd.wft + schd.wft.ie1 + schd.wft.ie2 + schd.wft.ie12 + + ;; sync + sync.rd + sync.wr + + ;; hwschd + hwschd.off r10 + hwschd.restore 0, r20 |