Commit 48ccfb40 by Denis Chertykov Committed by Denis Chertykov

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
parent 5a4aeb03
Fri Jul 13 23:04:00 2001 Denis Chertykov <denisc@overta.ru>
* 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 <kazu@hxi.com> 2001-07-13 Kazu Hirata <kazu@hxi.com>
* jump.c (reversed_comparison_code_parts): Fix comment typos. * jump.c (reversed_comparison_code_parts): Fix comment typos.
......
...@@ -816,12 +816,14 @@ avr_output_function_epilogue (file, size) ...@@ -816,12 +816,14 @@ avr_output_function_epilogue (file, size)
machine for a memory operand of mode MODE. */ machine for a memory operand of mode MODE. */
int int
int
legitimate_address_p (mode, x, strict) legitimate_address_p (mode, x, strict)
enum machine_mode mode; enum machine_mode mode;
rtx x; rtx x;
int strict; int strict;
{ {
int r = 0; enum reg_class r = NO_REGS;
if (TARGET_ALL_DEBUG) if (TARGET_ALL_DEBUG)
{ {
fprintf (stderr, "mode: (%s) %s %s %s %s:", fprintf (stderr, "mode: (%s) %s %s %s %s:",
...@@ -843,9 +845,9 @@ legitimate_address_p (mode, x, strict) ...@@ -843,9 +845,9 @@ legitimate_address_p (mode, x, strict)
} }
if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x) if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x)
: REG_OK_FOR_BASE_NOSTRICT_P (x))) : REG_OK_FOR_BASE_NOSTRICT_P (x)))
r = 'R'; r = POINTER_REGS;
else if (CONSTANT_ADDRESS_P (x)) else if (CONSTANT_ADDRESS_P (x))
r = 'S'; r = ALL_REGS;
else if (GET_CODE (x) == PLUS else if (GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 0))
&& GET_CODE (XEXP (x, 1)) == CONST_INT && GET_CODE (XEXP (x, 1)) == CONST_INT
...@@ -857,26 +859,26 @@ legitimate_address_p (mode, x, strict) ...@@ -857,26 +859,26 @@ legitimate_address_p (mode, x, strict)
if (! strict if (! strict
|| REGNO (XEXP (x,0)) == REG_Y || REGNO (XEXP (x,0)) == REG_Y
|| REGNO (XEXP (x,0)) == REG_Z) || REGNO (XEXP (x,0)) == REG_Z)
r = 'Q'; r = BASE_POINTER_REGS;
if (XEXP (x,0) == frame_pointer_rtx if (XEXP (x,0) == frame_pointer_rtx
|| XEXP (x,0) == arg_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) 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) else if ((GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC)
&& REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 0))
&& (strict ? REG_OK_FOR_BASE_STRICT_P (XEXP (x, 0)) && (strict ? REG_OK_FOR_BASE_STRICT_P (XEXP (x, 0))
: REG_OK_FOR_BASE_NOSTRICT_P (XEXP (x, 0)))) : REG_OK_FOR_BASE_NOSTRICT_P (XEXP (x, 0))))
{ {
r = 'T'; r = POINTER_REGS;
} }
if (TARGET_ALL_DEBUG) if (TARGET_ALL_DEBUG)
{ {
fprintf (stderr, " ret = %c\n", r); fprintf (stderr, " ret = %c\n", r);
} }
return r; return r == NO_REGS ? 0 : (int)r;
} }
/* Attempts to replace X with a valid /* Attempts to replace X with a valid
......
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
{ {
/* One of the ops has to be in a register */ /* One of the ops has to be in a register */
if (!register_operand(operand0, HImode) 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); operands[1] = copy_to_mode_reg(HImode, operand1);
} }
...@@ -475,11 +475,10 @@ ...@@ -475,11 +475,10 @@
(set_attr "cc" "clobber,clobber")]) (set_attr "cc" "clobber,clobber")])
(define_expand "strlenhi" (define_expand "strlenhi"
[(parallel [(set (match_dup 4)
[(set (match_dup 4) (unspec:HI [(match_operand:BLK 1 "memory_operand" "")
(unspec:HI [(match_operand:BLK 1 "memory_operand" "") (match_operand:QI 2 "const_int_operand" "")
(match_operand:QI 2 "const_int_operand" "") (match_operand:HI 3 "immediate_operand" "")] 0))
(match_operand:HI 3 "immediate_operand" "")] 0))])
(set (match_dup 4) (plus:HI (match_dup 4) (set (match_dup 4) (plus:HI (match_dup 4)
(const_int -1))) (const_int -1)))
(set (match_operand:HI 0 "register_operand" "") (set (match_operand:HI 0 "register_operand" "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment