aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mn10300/mn10300.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/mn10300/mn10300.c')
-rw-r--r--gcc/config/mn10300/mn10300.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 49b59b112e3..3bad60b7475 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Matsushita MN10300 series
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
@@ -264,7 +264,15 @@ print_operand (file, x, code)
break;
case 'N':
- output_address (GEN_INT ((~INTVAL (x)) & 0xff));
+ if (INTVAL (x) < -128 || INTVAL (x) > 255)
+ abort ();
+ fprintf (file, "%d", (int)((~INTVAL (x)) & 0xff));
+ break;
+
+ case 'U':
+ if (INTVAL (x) < -128 || INTVAL (x) > 255)
+ abort ();
+ fprintf (file, "%d", (int)(INTVAL (x) & 0xff));
break;
/* For shift counts. The hardware ignores the upper bits of
@@ -274,7 +282,7 @@ print_operand (file, x, code)
case 'S':
if (GET_CODE (x) == CONST_INT)
{
- fprintf (file, "%d", INTVAL (x) & 0x1f);
+ fprintf (file, "%d", (int)(INTVAL (x) & 0x1f));
break;
}
/* FALL THROUGH */