diff options
author | Alan Modra <amodra@bigpond.net.au> | 2005-10-26 07:49:05 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2005-10-26 07:49:05 +0000 |
commit | 9e298ed8ba5c6a92fec9928ad768a20803b77de1 (patch) | |
tree | 0d208f615626b9246af6c41acbd898930696a496 /cpu | |
parent | 91e750be54836c58cfdc9723ad127147d8e4fb6c (diff) | |
download | binutils-redhat-9e298ed8ba5c6a92fec9928ad768a20803b77de1.tar.gz |
* m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/ChangeLog | 4 | ||||
-rw-r--r-- | cpu/m32r.opc | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog index 48311b21b3..407b6bf714 100644 --- a/cpu/ChangeLog +++ b/cpu/ChangeLog @@ -1,3 +1,7 @@ +2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> + + * m32r.opc (parse_hi16): Do not assume a 32-bit host word size. + 2005-10-25 DJ Delorie <dj@redhat.com> * m32c.cpu (add16-bQ-sp,add16-wQ-sp): Fix to allow either width by diff --git a/cpu/m32r.opc b/cpu/m32r.opc index f2351b106a..ab69d078c8 100644 --- a/cpu/m32r.opc +++ b/cpu/m32r.opc @@ -127,7 +127,10 @@ parse_hi16 (CGEN_CPU_DESC cd, ++*strp; if (errmsg == NULL && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) - value >>= 16; + { + value >>= 16; + value &= 0xffff; + } *valuep = value; return errmsg; } @@ -142,8 +145,9 @@ parse_hi16 (CGEN_CPU_DESC cd, if (errmsg == NULL && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) { - value = value + (value & 0x8000 ? 0x10000 : 0); + value += 0x8000; value >>= 16; + value &= 0xffff; } *valuep = value; return errmsg; |