[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] avr port gcc-3.0: bugfix for strlen() bug
From: |
Denis Chertykov |
Subject: |
[avr-gcc-list] avr port gcc-3.0: bugfix for strlen() bug |
Date: |
Thu, 28 Jun 2001 01:03:16 +0400 |
Thu Jun 28 00:31:24 2001 Denis Chertykov <address@hidden>
* config/avr/avr.md (strlenhi): PARALLEL keyword removed.
* config/avr/avr.c (legitimate_address_p): Return value changed
from letter to register classes. For better debugging.
Index: config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.c,v
retrieving revision 1.38.2.1
diff -c -3 -p -r1.38.2.1 avr.c
*** avr.c 2001/05/12 20:32:41 1.38.2.1
--- avr.c 2001/06/27 20:34:21
*************** legitimate_address_p (mode, x, strict)
*** 802,808 ****
rtx x;
int strict;
{
! int r = 0;
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, "mode: (%s) %s %s %s %s:",
--- 802,809 ----
rtx x;
int strict;
{
! enum reg_class r = NO_REGS;
!
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, "mode: (%s) %s %s %s %s:",
*************** legitimate_address_p (mode, x, strict)
*** 824,832 ****
}
if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x)
: REG_OK_FOR_BASE_NOSTRICT_P (x)))
! r = 'R';
else if (CONSTANT_ADDRESS_P (x))
! r = 'S';
else if (GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
&& GET_CODE (XEXP (x, 1)) == CONST_INT
--- 825,833 ----
}
if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x)
: REG_OK_FOR_BASE_NOSTRICT_P (x)))
! r = POINTER_REGS;
else if (CONSTANT_ADDRESS_P (x))
! r = ALL_REGS;
else if (GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
&& GET_CODE (XEXP (x, 1)) == CONST_INT
*************** legitimate_address_p (mode, x, strict)
*** 838,863 ****
if (! strict
|| REGNO (XEXP (x,0)) == REG_Y
|| REGNO (XEXP (x,0)) == REG_Z)
! r = 'Q';
if (XEXP (x,0) == frame_pointer_rtx
|| XEXP (x,0) == arg_pointer_rtx)
! r = 'Q';
}
else if (frame_pointer_needed && XEXP (x,0) == frame_pointer_rtx)
! r = 'U';
}
else if ((GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC)
&& REG_P (XEXP (x, 0))
&& (strict ? REG_OK_FOR_BASE_STRICT_P (XEXP (x, 0))
: REG_OK_FOR_BASE_NOSTRICT_P (XEXP (x, 0))))
{
! r = 'T';
}
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, " ret = %c\n", r);
}
! return r;
}
/* Attempts to replace X with a valid
--- 839,864 ----
if (! strict
|| REGNO (XEXP (x,0)) == REG_Y
|| REGNO (XEXP (x,0)) == REG_Z)
! r = BASE_POINTER_REGS;
if (XEXP (x,0) == frame_pointer_rtx
|| XEXP (x,0) == arg_pointer_rtx)
! r = BASE_POINTER_REGS;
}
else if (frame_pointer_needed && XEXP (x,0) == frame_pointer_rtx)
! r = POINTER_Y_REGS;
}
else if ((GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC)
&& REG_P (XEXP (x, 0))
&& (strict ? REG_OK_FOR_BASE_STRICT_P (XEXP (x, 0))
: REG_OK_FOR_BASE_NOSTRICT_P (XEXP (x, 0))))
{
! r = POINTER_REGS;
}
if (TARGET_ALL_DEBUG)
{
fprintf (stderr, " ret = %c\n", r);
}
! return r == NO_REGS ? 0 : (int)r;
}
/* Attempts to replace X with a valid
Index: config/avr/avr.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.md,v
retrieving revision 1.26
diff -c -3 -p -r1.26 avr.md
*** avr.md 2001/01/21 07:08:46 1.26
--- avr.md 2001/06/27 20:34:28
***************
*** 475,485 ****
(set_attr "cc" "clobber,clobber")])
(define_expand "strlenhi"
! [(parallel
! [(set (match_dup 4)
! (unspec:HI [(match_operand:BLK 1 "memory_operand" "")
! (match_operand:QI 2 "const_int_operand" "")
! (match_operand:HI 3 "immediate_operand" "")] 0))])
(set (match_dup 4) (plus:HI (match_dup 4)
(const_int -1)))
(set (match_operand:HI 0 "register_operand" "")
--- 475,484 ----
(set_attr "cc" "clobber,clobber")])
(define_expand "strlenhi"
! [(set (match_dup 4)
! (unspec:HI [(match_operand:BLK 1 "memory_operand" "")
! (match_operand:QI 2 "const_int_operand" "")
! (match_operand:HI 3 "immediate_operand" "")] 0))
(set (match_dup 4) (plus:HI (match_dup 4)
(const_int -1)))
(set (match_operand:HI 0 "register_operand" "")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-gcc-list] avr port gcc-3.0: bugfix for strlen() bug,
Denis Chertykov <=