Commit 16594451 by Jeff Law

pa.h (IS_RELOADING_PSEUDO_P): New subroutine for EXTRA_CONSTRAINT.

	* pa.h (IS_RELOADING_PSEUDO_P): New subroutine for EXTRA_CONSTRAINT.
	(EXTRA_CONSTRAINT): Use IS_RELOADING_PSEUDO_P.  Accept any MEM for
	`Q' constraint during hte reload pass.

From-SVN: r3769
parent 04e1baee
...@@ -1039,18 +1039,16 @@ extern union tree_node *current_function_decl; ...@@ -1039,18 +1039,16 @@ extern union tree_node *current_function_decl;
(GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT \ (GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT \
|| (X) == CONST0_RTX (GET_MODE (X))) || (X) == CONST0_RTX (GET_MODE (X)))
/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx /* Subroutine for EXTRA_CONSTRAINT.
and check its validity for a certain class.
We have two alternate definitions for each of them.
The usual definition accepts all pseudo regs; the other rejects
them unless they have been allocated suitable hard regs.
The symbol REG_OK_STRICT causes the latter definition to be used.
Most source files want to accept pseudo regs in the hope that Return 1 iff OP is a pseudo which did not get a hard register and
they will get allocated to the class that the insn wants them to be in. we are running the reload pass. */
Source files for reload pass need to be strict.
After reload, it makes no difference, since pseudo regs have #define IS_RELOADING_PSEUDO_P(OP) \
been eliminated by then. */ ((reload_in_progress \
&& GET_CODE (OP) == REG \
&& REGNO (OP) >= FIRST_PSEUDO_REGISTER \
&& reg_renumber [REGNO (OP)] < 0))
/* Optional extra constraints for this machine. Borrowed from sparc.h. /* Optional extra constraints for this machine. Borrowed from sparc.h.
...@@ -1060,34 +1058,48 @@ extern union tree_node *current_function_decl; ...@@ -1060,34 +1058,48 @@ extern union tree_node *current_function_decl;
these things in insns and then not re-recognize the insns, causing these things in insns and then not re-recognize the insns, causing
constrain_operands to fail. constrain_operands to fail.
Also note `Q' accepts any memory operand during the reload pass.
This includes out-of-range displacements in reg+d addressing.
This makes for better code. (??? For 2.5 address this issue).
`R' is unused. `R' is unused.
`S' handles constraints for calls. `S' handles constraints for calls.
`T' is for fp load and store addresses.*/ `T' is for fp load and store addresses.*/
#define EXTRA_CONSTRAINT(OP, C) \ #define EXTRA_CONSTRAINT(OP, C) \
((C) == 'Q' ? \ ((C) == 'Q' ? \
((GET_CODE (OP) == MEM \ (IS_RELOADING_PSEUDO_P (OP) \
&& memory_address_p (GET_MODE (OP), XEXP (OP, 0)) \ || (GET_CODE (OP) == MEM \
&& ! symbolic_memory_operand (OP, VOIDmode)) \ && reload_in_progress) \
|| (GET_CODE (OP) == REG \ || (GET_CODE (OP) == MEM \
&& REGNO (OP) >= FIRST_PSEUDO_REGISTER \ && memory_address_p (GET_MODE (OP), XEXP (OP, 0))\
&& reg_renumber[REGNO (OP)] < 0)) \ && ! symbolic_memory_operand (OP, VOIDmode))) \
: ((C) == 'S' ? \ : ((C) == 'T' ? \
(IS_RELOADING_PSEUDO_P (OP) \
|| (GET_CODE (OP) == MEM \
&& short_memory_operand (OP, VOIDmode))) \
: ((C) == 'S' ? \
((CONSTANT_P (OP) && ! TARGET_LONG_CALLS) \ ((CONSTANT_P (OP) && ! TARGET_LONG_CALLS) \
|| (reload_in_progress \ || (reload_in_progress \
? strict_memory_address_p (Pmode, OP) \ ? strict_memory_address_p (Pmode, OP) \
: memory_address_p (Pmode, OP)) \ : memory_address_p (Pmode, OP)) \
|| (reload_in_progress \ || (reload_in_progress \
&& GET_CODE (OP) == REG \ && GET_CODE (OP) == REG \
&& reg_renumber[REGNO (OP)] > 0)) \ && reg_renumber[REGNO (OP)] > 0)) : 0)))
: ((C) == 'T' ? \
((GET_CODE (OP) == MEM \ /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
&& short_memory_operand (OP, VOIDmode)) \ and check its validity for a certain class.
|| (GET_CODE (OP) == REG \ We have two alternate definitions for each of them.
&& REGNO (OP) >= FIRST_PSEUDO_REGISTER \ The usual definition accepts all pseudo regs; the other rejects
&& reg_renumber[REGNO (OP)] < 0)) : 0))) them unless they have been allocated suitable hard regs.
The symbol REG_OK_STRICT causes the latter definition to be used.
Most source files want to accept pseudo regs in the hope that
they will get allocated to the class that the insn wants them to be in.
Source files for reload pass need to be strict.
After reload, it makes no difference, since pseudo regs have
been eliminated by then. */
#ifndef REG_OK_STRICT #ifndef REG_OK_STRICT
......
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