aboutsummaryrefslogtreecommitdiff
path: root/cpu/m32r.opc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-10-18 07:53:17 +0000
committerNick Clifton <nickc@redhat.com>2005-10-18 07:53:17 +0000
commit5e03663f3dbec4330c0bee3f4b120f38e02eeb77 (patch)
tree919902365541c3743005ac6a66a48516dc62e7d8 /cpu/m32r.opc
parentcd1fcb494fbb94d9615721d1f729f58c67bd36b8 (diff)
downloadgdb-5e03663f3dbec4330c0bee3f4b120f38e02eeb77.zip
gdb-5e03663f3dbec4330c0bee3f4b120f38e02eeb77.tar.gz
gdb-5e03663f3dbec4330c0bee3f4b120f38e02eeb77.tar.bz2
m32r.opc (parse_slo16): Better version of previous patch.
Diffstat (limited to 'cpu/m32r.opc')
-rw-r--r--cpu/m32r.opc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/m32r.opc b/cpu/m32r.opc
index afe12eb..2459fec 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;
}