aboutsummaryrefslogtreecommitdiff
path: root/cpu/m32r.opc
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/m32r.opc')
-rw-r--r--cpu/m32r.opc14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpu/m32r.opc b/cpu/m32r.opc
index 6764223..78bd0fa 100644
--- a/cpu/m32r.opc
+++ b/cpu/m32r.opc
@@ -1,6 +1,6 @@
/* M32R opcode support. -*- C -*-
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
Contributed by Red Hat Inc; developed under contract from
Mitsubishi Electric Corporation.
@@ -23,9 +23,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This file is an addendum to m32r.cpu. Heavy use of C code isn't
appropriate in .cpu files, so it resides here. This especially applies
@@ -40,8 +38,7 @@
<arch>-opc.c additions use: "-- opc.c"
<arch>-asm.c additions use: "-- asm.c"
<arch>-dis.c additions use: "-- dis.c"
- <arch>-ibd.h additions use: "-- ibd.h"
-*/
+ <arch>-ibd.h additions use: "-- ibd.h" */
/* -- opc.h */
@@ -153,7 +150,10 @@ parse_hi16 (cd, strp, opindex, valuep)
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
- value = (value >> 16) + (value & 0x8000 ? 1 : 0);
+ {
+ value = value + (value & 0x8000 ? 0x10000 : 0);
+ value >>= 16;
+ }
*valuep = value;
return errmsg;
}