From 48ccfb4086add7f319242fe6c2ec178788dd278f Mon Sep 17 00:00:00 2001 From: Denis Chertykov Date: Fri, 13 Jul 2001 19:13:55 +0000 Subject: [PATCH] avr.md (strlenhi): PARALLEL keyword removed. * 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. From-SVN: r43992 --- gcc/ChangeLog | 6 ++++++ gcc/config/avr/avr.c | 18 ++++++++++-------- gcc/config/avr/avr.md | 11 +++++------ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db0125f9b4e..8be501f3794 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Fri Jul 13 23:04:00 2001 Denis Chertykov + + * 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. + 2001-07-13 Kazu Hirata * jump.c (reversed_comparison_code_parts): Fix comment typos. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 303be94a88d..605360a601b 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -815,13 +815,15 @@ avr_output_function_epilogue (file, size) /* Return nonzero if X (an RTX) is a legitimate memory address on the target machine for a memory operand of mode MODE. */ +int int legitimate_address_p (mode, x, strict) enum machine_mode mode; rtx x; int strict; { - int r = 0; + enum reg_class r = NO_REGS; + if (TARGET_ALL_DEBUG) { fprintf (stderr, "mode: (%s) %s %s %s %s:", @@ -843,9 +845,9 @@ legitimate_address_p (mode, x, strict) } if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x) : REG_OK_FOR_BASE_NOSTRICT_P (x))) - r = 'R'; + r = POINTER_REGS; else if (CONSTANT_ADDRESS_P (x)) - r = 'S'; + r = ALL_REGS; else if (GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && GET_CODE (XEXP (x, 1)) == CONST_INT @@ -857,26 +859,26 @@ legitimate_address_p (mode, x, strict) if (! strict || REGNO (XEXP (x,0)) == REG_Y || REGNO (XEXP (x,0)) == REG_Z) - r = 'Q'; + r = BASE_POINTER_REGS; if (XEXP (x,0) == frame_pointer_rtx || XEXP (x,0) == arg_pointer_rtx) - r = 'Q'; + r = BASE_POINTER_REGS; } else if (frame_pointer_needed && XEXP (x,0) == frame_pointer_rtx) - r = 'U'; + 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 = 'T'; + r = POINTER_REGS; } if (TARGET_ALL_DEBUG) { fprintf (stderr, " ret = %c\n", r); } - return r; + return r == NO_REGS ? 0 : (int)r; } /* Attempts to replace X with a valid diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index cd72f1014dc..a62f679ad2e 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -224,7 +224,7 @@ { /* One of the ops has to be in a register */ if (!register_operand(operand0, HImode) - && !(register_operand(operand1, HImode) || const0_rtx == operands[1])) + && !(register_operand(operand1, HImode) || const0_rtx == operands[1])) { operands[1] = copy_to_mode_reg(HImode, operand1); } @@ -475,11 +475,10 @@ (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) + (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" "") -- 2.30.2