diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-06-14 21:48:11 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-06-15 09:01:48 +0100 |
commit | 02f3be19f6fca3a46794f8f32350cc090ac38d0e (patch) | |
tree | d82f2c8e7a521dcd148b248cc1a3af18f9356e8a /opcodes/arc-opc.c | |
parent | 31eef93e717c59975b3e6f37619ab956302ca37a (diff) | |
download | gdb-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.c | 2 |
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; } |