From 13874398a35beb6886581001e6737ca1528325f6 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 30 Apr 2012 22:04:22 +0000 Subject: * rx-decode.opc (MOV): Do not sign-extend immediates which are already the maximum bit size. * rx-decode.c: Regenerate. --- opcodes/rx-decode.opc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'opcodes/rx-decode.opc') diff --git a/opcodes/rx-decode.opc b/opcodes/rx-decode.opc index a426b86416a..b28ea8cf2d0 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_____; -- cgit v1.2.1