diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-13 23:07:47 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-13 23:07:47 +0000 |
commit | 058f71f0dcdae45abe2fd92a611d660bcfd68127 (patch) | |
tree | 7a9657cf5fbd4d7bd8cdc6c2eefd735cd205ac9c /gcc/config/mn10300/mn10300.c | |
parent | d1211e9636047ed32b584830d2b0210775e2b339 (diff) | |
download | gcc-058f71f0dcdae45abe2fd92a611d660bcfd68127.tar.gz |
* config/mn10300/mn10300.c (print_operand) <case N>: Check
operand's range. Print value directly, without aid from
output_address.
<case U>: New.
<case S>: Make sure argument to fprintf has the right type.
* config/mn10300/mn10300.h (OK_FOR_T): New macro.
(EXTRA_CONSTRAINT): Adjust.
* config/mn10300/mn10300.md: Add new all-QImode pattern for
bclr. Use %U for immediate operands of bset and bclr.
(iorqi3): New expand, with insns for AM33 and mn10300.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60109 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mn10300/mn10300.c')
-rw-r--r-- | gcc/config/mn10300/mn10300.c | 14 |
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 */ |