diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2016-10-13 15:01:19 +0200 |
---|---|---|
committer | Claudiu Zissulescu <claziss@synopsys.com> | 2016-10-14 13:52:15 +0200 |
commit | e5b06ef06b062f0626462abb182ee5470cf798bc (patch) | |
tree | c0df3f5db56418cfaf7e1cd62bcc070d9d1cf53e /gas/testsuite | |
parent | afb1110bfa4fe150cb2f2c58329551bd82cb3627 (diff) | |
download | gdb-e5b06ef06b062f0626462abb182ee5470cf798bc.zip gdb-e5b06ef06b062f0626462abb182ee5470cf798bc.tar.gz gdb-e5b06ef06b062f0626462abb182ee5470cf798bc.tar.bz2 |
[ARC] Disassembler: fix LIMM detection for short instructions.
The ARC (short) instructions are using a special register number to
indicate is the instruction uses a long immediate (LIMM). In the case
of short instruction, this LIMM indicator depends on the ISA version
used. Thus, for ARCv1 processors, the LIMM indicator is 0x3E, the same
value used in "long" instructions. However, for the ARCv2 processors,
this LIMM indicator is 0x1E.
This patch fixes the LIMM detection for ARCv1 ISA and adds two tests.
gas/
2016-10-13 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/shortlimm_a7.d: New file.
* testsuite/gas/arc/shortlimm_a7.s: Likewise.
* testsuite/gas/arc/shortlimm_hs.d: Likewise.
* testsuite/gas/arc/shortlimm_hs.s: Likewise.
include/
2016-10-13 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (ARC_OPCODE_ARCV2): New define.
opcodes/
2016-10-13 Claudiu Zissulescu <claziss@synopsys.com>
* arc-dis.c (find_format_from_table): Discriminate LIMM indicator
usage on ISA basis.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/arc/shortlimm_a7.d | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/arc/shortlimm_a7.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arc/shortlimm_hs.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/arc/shortlimm_hs.s | 9 |
4 files changed, 40 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arc/shortlimm_a7.d b/gas/testsuite/gas/arc/shortlimm_a7.d new file mode 100644 index 0000000..efed86f --- /dev/null +++ b/gas/testsuite/gas/arc/shortlimm_a7.d @@ -0,0 +1,11 @@ +#objdump: -d + +.*: +file format .*arc.* + + +Disassembly of section .text: + +00000000 <.text>: + 0: 70c7 0000 1000 add_s r0,r0,0x1000 + 6: 72d7 0000 1000 cmp_s r2,0x1000 + c: 72cf 0000 1000 mov_s r2,0x1000 diff --git a/gas/testsuite/gas/arc/shortlimm_a7.s b/gas/testsuite/gas/arc/shortlimm_a7.s new file mode 100644 index 0000000..fd14206 --- /dev/null +++ b/gas/testsuite/gas/arc/shortlimm_a7.s @@ -0,0 +1,5 @@ + .cpu ARC700 + .text + add_s r0,r0,0x1000 + cmp_s r2,0x1000 + mov_s r2,0x1000 diff --git a/gas/testsuite/gas/arc/shortlimm_hs.d b/gas/testsuite/gas/arc/shortlimm_hs.d new file mode 100644 index 0000000..0313cff --- /dev/null +++ b/gas/testsuite/gas/arc/shortlimm_hs.d @@ -0,0 +1,15 @@ +#objdump: -d + +.*: +file format .*arc.* + + +Disassembly of section .text: + +00000000 <.text>: + 0: 70c3 0000 1000 add_s r0,r0,0x1000 + 6: 71c7 0000 1001 add_s 0,0x1001,1 + c: 72d3 0000 1000 cmp_s r2,0x1000 + 12: 71d7 0000 1000 cmp_s 0x1000,1 + 18: 42c3 0000 1000 mov_s r2,0x1000 + 1e: 46db 0000 1000 mov_s 0,0x1000 + 24: 72df 0000 1000 mov_s.ne r2,0x1000 diff --git a/gas/testsuite/gas/arc/shortlimm_hs.s b/gas/testsuite/gas/arc/shortlimm_hs.s new file mode 100644 index 0000000..3f2be12 --- /dev/null +++ b/gas/testsuite/gas/arc/shortlimm_hs.s @@ -0,0 +1,9 @@ + .cpu HS + .text + add_s r0,r0,0x1000 + add_s 0,0x1001,1 + cmp_s r2,0x1000 + cmp_s 0x1000,1 + mov_s r2,0x1000 + mov_s 0,0x1000 + mov_s.ne r2,0x1000 |