aboutsummaryrefslogtreecommitdiff
path: root/opcodes/arc-opc.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-06-14 21:48:11 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2016-06-15 09:01:48 +0100
commit02f3be19f6fca3a46794f8f32350cc090ac38d0e (patch)
treed82f2c8e7a521dcd148b248cc1a3af18f9356e8a /opcodes/arc-opc.c
parent31eef93e717c59975b3e6f37619ab956302ca37a (diff)
downloadgdb-02f3be19f6fca3a46794f8f32350cc090ac38d0e.zip
gdb-02f3be19f6fca3a46794f8f32350cc090ac38d0e.tar.gz
gdb-02f3be19f6fca3a46794f8f32350cc090ac38d0e.tar.bz2
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.
Diffstat (limited to 'opcodes/arc-opc.c')
-rw-r--r--opcodes/arc-opc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/arc-opc.c b/opcodes/arc-opc.c
index 433fdcc..25db868 100644
--- a/opcodes/arc-opc.c
+++ b/opcodes/arc-opc.c
@@ -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;
}