This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
a couple of parisc asserts
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Wed, 27 Apr 2005 16:08:28 +0100
- Subject: a couple of parisc asserts
- Organization: CodeSourcery LLC
Hi,
I forgot a couple of files when assertifying the pa target. I would install
this as obvious except for the change I made to PRINT_OPERAND_ADDRESS.
That had logic to cope with '(PLUS (CONST_INT) (REG))', but that's
non-canonical and would not be generated by the middle end. AFAICT
it won't ever be created, but I might have missed something.
booted and tested on hppa2.0w-hp-hpux11.11, ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2005-04-27 Nathan Sidwell <nathan@codesourcery.com>
* config/pa/pa.h (PRINT_OPERAND_ADDRESS): Use gcc_assert, remove
unnecessary noncanonical RTL handling.
* config/pa/pa64-linux.h (INITIAL_ELIMINATION_OFFSET): Use
gcc_assert and gcc_unreachable.
Index: config/pa/pa.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.h,v
retrieving revision 1.246
diff -c -3 -p -r1.246 pa.h
*** config/pa/pa.h 23 Apr 2005 07:02:16 -0000 1.246
--- config/pa/pa.h 27 Apr 2005 15:03:58 -0000
*************** forget_section (void) \
*** 1870,1891 ****
/* Print a memory address as an operand to reference that memory location. */
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
! { register rtx addr = ADDR; \
! register rtx base; \
! int offset; \
switch (GET_CODE (addr)) \
{ \
case REG: \
fprintf (FILE, "0(%s)", reg_names [REGNO (addr)]); \
break; \
case PLUS: \
! if (GET_CODE (XEXP (addr, 0)) == CONST_INT) \
! offset = INTVAL (XEXP (addr, 0)), base = XEXP (addr, 1); \
! else if (GET_CODE (XEXP (addr, 1)) == CONST_INT) \
! offset = INTVAL (XEXP (addr, 1)), base = XEXP (addr, 0); \
! else \
! abort (); \
! fprintf (FILE, "%d(%s)", offset, reg_names [REGNO (base)]); \
break; \
case LO_SUM: \
if (!symbolic_operand (XEXP (addr, 1), VOIDmode)) \
--- 1870,1885 ----
/* Print a memory address as an operand to reference that memory location. */
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
! { rtx addr = ADDR; \
switch (GET_CODE (addr)) \
{ \
case REG: \
fprintf (FILE, "0(%s)", reg_names [REGNO (addr)]); \
break; \
case PLUS: \
! gcc_assert (GET_CODE (XEXP (addr, 1)) == CONST_INT); \
! fprintf (FILE, "%d(%s)", (int)INTVAL (XEXP (addr, 1)), \
! reg_names [REGNO (XEXP (addr, 0))]); \
break; \
case LO_SUM: \
if (!symbolic_operand (XEXP (addr, 1), VOIDmode)) \
Index: config/pa/pa64-linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa64-linux.h,v
retrieving revision 1.4
diff -c -3 -p -r1.4 pa64-linux.h
*** config/pa/pa64-linux.h 23 Aug 2003 01:32:59 -0000 1.4
--- config/pa/pa64-linux.h 27 Apr 2005 15:03:58 -0000
*************** Boston, MA 02111-1307, USA. */
*** 52,59 ****
break; \
} \
\
! if ((TO) != STACK_POINTER_REGNUM) \
! abort (); \
\
switch (FROM) \
{ \
--- 52,58 ----
break; \
} \
\
! gcc_assert ((TO) == STACK_POINTER_REGNUM); \
\
switch (FROM) \
{ \
*************** Boston, MA 02111-1307, USA. */
*** 66,72 ****
break; \
\
default: \
! abort (); \
} \
} while (0)
#endif
--- 65,71 ----
break; \
\
default: \
! gcc_unreachable (); \
} \
} while (0)
#endif