opcodes/arc: Fix extract for some add_s instructions
The extract function used for some arc_s instructions was not implemented, and instead always returned 0. Fixed in this commit. opcodes/ChangeLog: * arc-opc.c (extract_rhv1): Extract value from insn. gas/ChangeLog: * testsuite/gas/arc/add_s.d: New file. * testsuite/gas/arc/add_s.s: New file.
This commit is contained in:
parent
31eef93e71
commit
02f3be19f6
5 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-06-15 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* testsuite/gas/arc/add_s.d: New file.
|
||||
* testsuite/gas/arc/add_s.s: New file.
|
||||
|
||||
2016-06-14 Graham Markall <graham.markall@embecosm.com>
|
||||
|
||||
* testsuite/gas/arc/nps400-6.s: Add tests of ldbit.
|
||||
|
|
8
gas/testsuite/gas/arc/add_s.d
Normal file
8
gas/testsuite/gas/arc/add_s.d
Normal file
|
@ -0,0 +1,8 @@
|
|||
#as: -mcpu=arc700
|
||||
#objdump: -dr --prefix-addresses --show-raw-insn
|
||||
|
||||
.*: +file format .*arc.*
|
||||
|
||||
Disassembly of section .text:
|
||||
0x[0-9a-f]+ 6178 add_s r0,r1,r3
|
||||
0x[0-9a-f]+ 70e7 add_s r0,r0,pcl
|
4
gas/testsuite/gas/arc/add_s.s
Normal file
4
gas/testsuite/gas/arc/add_s.s
Normal file
|
@ -0,0 +1,4 @@
|
|||
# add_s test
|
||||
|
||||
add_s r0,r1,r3
|
||||
add_s r0,r0,pcl
|
|
@ -1,3 +1,7 @@
|
|||
2016-06-15 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* arc-opc.c (extract_rhv1): Extract value from insn.
|
||||
|
||||
2016-06-14 Graham Markall <graham.markall@embecosm.com>
|
||||
|
||||
* arc-nps400-tbl.h: Add ldbit instruction.
|
||||
|
|
|
@ -130,7 +130,7 @@ static int
|
|||
extract_rhv1 (unsigned insn ATTRIBUTE_UNUSED,
|
||||
bfd_boolean * invalid ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int value = 0;
|
||||
int value = ((insn & 0x7) << 3) | ((insn >> 5) & 0x7);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue