diff --git a/cpu/ChangeLog b/cpu/ChangeLog index ecc06b4565..5478b4d375 100644 --- a/cpu/ChangeLog +++ b/cpu/ChangeLog @@ -1,3 +1,7 @@ +2005-10-18 Andreas Schwab + + * m32r.opc (parse_slo16): Better version of previous patch. + 2005-10-14 Kazuhiro Inaoka * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word diff --git a/cpu/m32r.opc b/cpu/m32r.opc index afe12eb7b6..2459fecbf5 100644 --- a/cpu/m32r.opc +++ b/cpu/m32r.opc @@ -182,8 +182,8 @@ parse_slo16 (CGEN_CPU_DESC cd, { value &= 0xffff; if (value & 0x8000) - value |= ~0xffff; - } + value = ((value & 0xffff) ^ 0x8000) - 0x8000; + } *valuep = value; return errmsg; } diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 9bcce14c6e..6bfdb7ceb7 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2005-10-18 Nick Clifton + + * m32r-asm.c: Regenerate after updating m32r.opc. + 2005-10-14 Kazuhiro Inaoka * m32r-asm.c: Regenerate after updating m32r.opc. diff --git a/opcodes/m32r-asm.c b/opcodes/m32r-asm.c index b45f720ee4..39546082d4 100644 --- a/opcodes/m32r-asm.c +++ b/opcodes/m32r-asm.c @@ -144,8 +144,8 @@ parse_slo16 (CGEN_CPU_DESC cd, { value &= 0xffff; if (value & 0x8000) - value |= ~0xffff; - } + value = ((value & 0xffff) ^ 0x8000) - 0x8000; + } *valuep = value; return errmsg; }