aboutsummaryrefslogtreecommitdiff
path: root/opcodes/rx-decode.opc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2012-04-30 22:04:22 +0000
committerDJ Delorie <dj@redhat.com>2012-04-30 22:04:22 +0000
commit78e98aaba5b8ece23f0cbb1a6baa0f3b1891b275 (patch)
treed21d7563a8b2af0bd80fd9a8bf6bca6c89ea5c91 /opcodes/rx-decode.opc
parentbe36f02d8a3729c9429487a678153c4705cc92c6 (diff)
downloadgdb-78e98aaba5b8ece23f0cbb1a6baa0f3b1891b275.zip
gdb-78e98aaba5b8ece23f0cbb1a6baa0f3b1891b275.tar.gz
gdb-78e98aaba5b8ece23f0cbb1a6baa0f3b1891b275.tar.bz2
* rx-decode.opc (MOV): Do not sign-extend immediates which are
already the maximum bit size. * rx-decode.c: Regenerate.
Diffstat (limited to 'opcodes/rx-decode.opc')
-rw-r--r--opcodes/rx-decode.opc15
1 files changed, 14 insertions, 1 deletions
diff --git a/opcodes/rx-decode.opc b/opcodes/rx-decode.opc
index a426b86..b28ea8c 100644
--- a/opcodes/rx-decode.opc
+++ b/opcodes/rx-decode.opc
@@ -262,7 +262,20 @@ rx_decode_opcode (unsigned long pc AU,
ID(mov); DR(rdst); SC(IMM (1)); F_____;
/** 1111 10sd rdst im sz mov%s #%1, %0 */
- ID(mov); sBWL (sz); DD(sd, rdst, sz); SC(IMMex(im)); F_____;
+ ID(mov); DD(sd, rdst, sz);
+ if ((im == 1 && sz == 0)
+ || (im == 2 && sz == 1)
+ || (im == 0 && sz == 2))
+ {
+ BWL (sz);
+ SC(IMM(im));
+ }
+ else
+ {
+ sBWL (sz);
+ SC(IMMex(im));
+ }
+ F_____;
/** 0110 0110 immm rdst mov%s #%1, %0 */
ID(mov); DR(rdst); SC(immm); F_____;