From c21242e8e034676c367a0c6e6d47cf3ba53eb942 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Sun, 23 Apr 2006 17:25:30 +0000 Subject: re PR target/16641 (fr30-elf-gcc compiler error when building newlib-1.12.0) PR target/16641 * config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Check REGNO for STACK_POINTER_RTX and FRAME_POINTER_RTX instead of comparing the rtx to stack_pointer_rtx or frame_pointer_rtx directly. From-SVN: r113196 --- gcc/ChangeLog | 7 +++++++ gcc/config/fr30/fr30.h | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 76914ef..f93061d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-04-23 Roger Sayle + + PR target/16641 + * config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Check REGNO for + STACK_POINTER_RTX and FRAME_POINTER_RTX instead of comparing the + rtx to stack_pointer_rtx or frame_pointer_rtx directly. + 2006-04-23 Eric Botcazou * fold-const.c (range_predecessor): Use operand_equal_p diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h index b423b0a..0901649 100644 --- a/gcc/config/fr30/fr30.h +++ b/gcc/config/fr30/fr30.h @@ -842,13 +842,15 @@ do \ goto LABEL; \ if (GET_CODE (X) == PLUS \ && ((MODE) == SImode || (MODE) == SFmode) \ - && XEXP (X, 0) == stack_pointer_rtx \ + && GET_CODE (XEXP (X, 0)) == REG \ + && REGNO (XEXP (X, 0)) == STACK_POINTER_REGNUM \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 << 6) - 4)) \ goto LABEL; \ if (GET_CODE (X) == PLUS \ && ((MODE) == SImode || (MODE) == SFmode) \ - && XEXP (X, 0) == frame_pointer_rtx \ + && GET_CODE (XEXP (X, 0)) == REG \ + && REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \ goto LABEL; \ @@ -862,15 +864,16 @@ do \ goto LABEL; \ if (GET_CODE (X) == PLUS \ && ((MODE) == SImode || (MODE) == SFmode) \ - && XEXP (X, 0) == stack_pointer_rtx \ + && GET_CODE (XEXP (X, 0)) == REG \ + && REGNO (XEXP (X, 0)) == STACK_POINTER_REGNUM \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 << 6) - 4)) \ goto LABEL; \ if (GET_CODE (X) == PLUS \ && ((MODE) == SImode || (MODE) == SFmode) \ - && GET_CODE (XEXP (X, 0)) == REG \ - && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \ - || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM) \ + && GET_CODE (XEXP (X, 0)) == REG \ + && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM \ + || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM) \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \ goto LABEL; \ -- cgit v1.1