Commit 1a04ac2b by John David Anglin Committed by John David Anglin

constraints.md: Adjust unused letters.

	* config/pa/constraints.md: Adjust unused letters.  Change "T"
	constraint to match_test floating_point_store_memory_operand().
	* config/pa/predicates.md (reg_plus_base_memory_operand): New.
	(base14_operand): New.
	(floating_point_store_memory_operand): New.
	(integer_store_memory_operand): Revise to use base14_operand and
	reg_plus_base_memory_operand.
	(move_dest_operand): Allow symbolic_memory_operands.
	(symbolic_memory_operand): Check for LO_SOM.
	(symbolic_operand): Change default case to break.
	* config/pa/pa.md: Remove unamed DFmode and SFmode patterns to force
	CONST_DOUBLE values to be reloaded by putting them into memory when
	the destination is a floating point register.
	(movdf): Remove code to handle CONST_DOUBLE.
	(movsf): Likewise.
	(reload_indf_r1): New.
	(reload_insf_r1): New.
	Consistently use "Q" and "T" constraints with integer and floating
	point move instructions, respectively.
	(movdi): Remove FAIL.
	Change predicate for source operand unamed DImode move from
	general_operand to move_src_operand.
	(umulsidi3): Change predicate for destination operand to
	register_operand.
	Likewise for similar unamed patterns.
	* config/pa/pa-protos.h (pa_legitimize_reload_address): Declare.
	* config/pa/pa.c (pa_symbolic_expression_p): Remove extra parenthesis.
	(hppa_legitimize_address): Simplify mask calculation.
	(pa_emit_move_sequence): Revised handling of secondary reloads from
	REG+D addresses for floating point loads and stores.  Directly handle
	loading CONST0_RTX (mode) to a floating point register.
	(pa_secondary_reload): Handle reloading DF and SFmode constant values
	to floating point registers.  Don't restrict secondary reloads to
	floating point registers to integer modes.  Revise some comments and
	cleanup some code.
	(TARGET_LEGITIMATE_ADDRESS_P): Define.
	(pa_legitimate_address_p): New.
	(pa_legitimize_reload_address): New.
	* config/pa/pa.h (STRICT_REG_OK_FOR_INDEX_P): New.
	(STRICT_REG_OK_FOR_BASE_P): New.
	(GO_IF_LEGITIMATE_ADDRESS): Delete.  Update some related comments.
	(LEGITIMIZE_RELOAD_ADDRESS): Revise to use pa_legitimize_reload_address.

From-SVN: r195702
parent 405feeb8
2013-02-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config/pa/constraints.md: Adjust unused letters. Change "T"
constraint to match_test floating_point_store_memory_operand().
* config/pa/predicates.md (reg_plus_base_memory_operand): New.
(base14_operand): New.
(floating_point_store_memory_operand): New.
(integer_store_memory_operand): Revise to use base14_operand and
reg_plus_base_memory_operand.
(move_dest_operand): Allow symbolic_memory_operands.
(symbolic_memory_operand): Check for LO_SOM.
(symbolic_operand): Change default case to break.
* config/pa/pa.md: Remove unamed DFmode and SFmode patterns to force
CONST_DOUBLE values to be reloaded by putting them into memory when
the destination is a floating point register.
(movdf): Remove code to handle CONST_DOUBLE.
(movsf): Likewise.
(reload_indf_r1): New.
(reload_insf_r1): New.
Consistently use "Q" and "T" constraints with integer and floating
point move instructions, respectively.
(movdi): Remove FAIL.
Change predicate for source operand unamed DImode move from
general_operand to move_src_operand.
(umulsidi3): Change predicate for destination operand to
register_operand.
Likewise for similar unamed patterns.
* config/pa/pa-protos.h (pa_legitimize_reload_address): Declare.
* config/pa/pa.c (pa_symbolic_expression_p): Remove extra parenthesis.
(hppa_legitimize_address): Simplify mask calculation.
(pa_emit_move_sequence): Revised handling of secondary reloads from
REG+D addresses for floating point loads and stores. Directly handle
loading CONST0_RTX (mode) to a floating point register.
(pa_secondary_reload): Handle reloading DF and SFmode constant values
to floating point registers. Don't restrict secondary reloads to
floating point registers to integer modes. Revise some comments and
cleanup some code.
(TARGET_LEGITIMATE_ADDRESS_P): Define.
(pa_legitimate_address_p): New.
(pa_legitimize_reload_address): New.
* config/pa/pa.h (STRICT_REG_OK_FOR_INDEX_P): New.
(STRICT_REG_OK_FOR_BASE_P): New.
(GO_IF_LEGITIMATE_ADDRESS): Delete. Update some related comments.
(LEGITIMIZE_RELOAD_ADDRESS): Revise to use pa_legitimize_reload_address.
2013-02-03 David Edelsohn <dje.gcc@gmail.com> 2013-02-03 David Edelsohn <dje.gcc@gmail.com>
Andrew Dixie <andrewd@gentrack.com> Andrew Dixie <andrewd@gentrack.com>
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
;; <http://www.gnu.org/licenses/>. ;; <http://www.gnu.org/licenses/>.
;;; Unused letters: ;;; Unused letters:
;;; ABCDEF H V Y ;;; ABCD H Y
;;; bcde ghijklmnop stuvw z ;;; bcde h jkl tuvw z
;; Register constraints. ;; Register constraints.
(define_register_constraint "a" "R1_REGS" (define_register_constraint "a" "R1_REGS"
...@@ -124,12 +124,7 @@ ...@@ -124,12 +124,7 @@
(define_constraint "T" (define_constraint "T"
"A memory operand for floating-point loads and stores." "A memory operand for floating-point loads and stores."
(and (match_code "mem") (match_test "floating_point_store_memory_operand (op, mode)"))
(match_test "!IS_LO_SUM_DLT_ADDR_P (XEXP (op, 0))
&& !IS_INDEX_ADDR_P (XEXP (op, 0))
&& memory_address_p ((GET_MODE_SIZE (mode) == 4
? SFmode : DFmode),
XEXP (op, 0))")))
;; We could allow short displacements but TARGET_LEGITIMATE_ADDRESS_P ;; We could allow short displacements but TARGET_LEGITIMATE_ADDRESS_P
;; can't tell when a long displacement is valid. ;; can't tell when a long displacement is valid.
......
...@@ -67,6 +67,8 @@ extern int pa_fpstore_bypass_p (rtx, rtx); ...@@ -67,6 +67,8 @@ extern int pa_fpstore_bypass_p (rtx, rtx);
extern int pa_attr_length_millicode_call (rtx); extern int pa_attr_length_millicode_call (rtx);
extern int pa_attr_length_call (rtx, int); extern int pa_attr_length_call (rtx, int);
extern int pa_attr_length_indirect_call (rtx); extern int pa_attr_length_indirect_call (rtx);
extern rtx pa_legitimize_reload_address (rtx, enum machine_mode,
int, int, int);
/* Declare functions defined in pa.c and used in templates. */ /* Declare functions defined in pa.c and used in templates. */
......
...@@ -3772,52 +3772,32 @@ ...@@ -3772,52 +3772,32 @@
;; Floating point move insns ;; Floating point move insns
;; This pattern forces (set (reg:DF ...) (const_double ...))
;; to be reloaded by putting the constant into memory when
;; reg is a floating point register.
;;
;; For integer registers we use ldil;ldo to set the appropriate
;; value.
;;
;; This must come before the movdf pattern, and it must be present
;; to handle obscure reloading cases.
(define_insn ""
[(set (match_operand:DF 0 "register_operand" "=?r,f")
(match_operand:DF 1 "" "?F,m"))]
"GET_CODE (operands[1]) == CONST_DOUBLE
&& operands[1] != CONST0_RTX (DFmode)
&& !TARGET_64BIT
&& !TARGET_SOFT_FLOAT"
"* return (which_alternative == 0 ? pa_output_move_double (operands)
: \"fldd%F1 %1,%0\");"
[(set_attr "type" "move,fpload")
(set_attr "length" "16,4")])
(define_expand "movdf" (define_expand "movdf"
[(set (match_operand:DF 0 "general_operand" "") [(set (match_operand:DF 0 "general_operand" "")
(match_operand:DF 1 "general_operand" ""))] (match_operand:DF 1 "general_operand" ""))]
"" ""
" "
{ {
if (GET_CODE (operands[1]) == CONST_DOUBLE
&& operands[1] != CONST0_RTX (DFmode))
{
/* Reject CONST_DOUBLE loads to all hard registers when
generating 64-bit code and to floating point registers
when generating 32-bit code. */
if (REG_P (operands[0])
&& HARD_REGISTER_P (operands[0])
&& (TARGET_64BIT || REGNO (operands[0]) >= 32))
FAIL;
if (TARGET_64BIT)
operands[1] = force_const_mem (DFmode, operands[1]);
}
if (pa_emit_move_sequence (operands, DFmode, 0)) if (pa_emit_move_sequence (operands, DFmode, 0))
DONE; DONE;
}") }")
;; Handle DFmode input reloads requiring %r1 as a scratch register.
(define_expand "reload_indf_r1"
[(set (match_operand:DF 0 "register_operand" "=Z")
(match_operand:DF 1 "non_hard_reg_operand" ""))
(clobber (match_operand:SI 2 "register_operand" "=&a"))]
""
"
{
if (pa_emit_move_sequence (operands, DFmode, operands[2]))
DONE;
/* We don't want the clobber emitted, so handle this ourselves. */
emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
DONE;
}")
;; Handle DFmode input reloads requiring a general register as a ;; Handle DFmode input reloads requiring a general register as a
;; scratch register. ;; scratch register.
(define_expand "reload_indf" (define_expand "reload_indf"
...@@ -3854,9 +3834,9 @@ ...@@ -3854,9 +3834,9 @@
(define_insn "" (define_insn ""
[(set (match_operand:DF 0 "move_dest_operand" [(set (match_operand:DF 0 "move_dest_operand"
"=f,*r,Q,?o,?Q,f,*r,*r,?*r,?f") "=f,*r,T,?o,?Q,f,*r,*r,?*r,?f")
(match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand"
"fG,*rG,f,*r,*r,RQ,o,RQ,f,*r"))] "fG,*rG,f,*r,*r,RT,o,RQ,f,*r"))]
"(register_operand (operands[0], DFmode) "(register_operand (operands[0], DFmode)
|| reg_or_0_operand (operands[1], DFmode)) || reg_or_0_operand (operands[1], DFmode))
&& !(GET_CODE (operands[1]) == CONST_DOUBLE && !(GET_CODE (operands[1]) == CONST_DOUBLE
...@@ -4071,18 +4051,6 @@ ...@@ -4071,18 +4051,6 @@
"" ""
" "
{ {
/* Except for zero, we don't support loading a CONST_INT directly
to a hard floating-point register since a scratch register is
needed for the operation. While the operation could be handled
before register allocation, the simplest solution is to fail. */
if (TARGET_64BIT
&& GET_CODE (operands[1]) == CONST_INT
&& operands[1] != CONST0_RTX (DImode)
&& REG_P (operands[0])
&& HARD_REGISTER_P (operands[0])
&& REGNO (operands[0]) >= 32)
FAIL;
if (pa_emit_move_sequence (operands, DImode, 0)) if (pa_emit_move_sequence (operands, DImode, 0))
DONE; DONE;
}") }")
...@@ -4190,7 +4158,7 @@ ...@@ -4190,7 +4158,7 @@
(define_insn "" (define_insn ""
[(set (match_operand:DI 0 "move_dest_operand" [(set (match_operand:DI 0 "move_dest_operand"
"=r,o,Q,r,r,r,*f,*f,T,?r,?*f") "=r,o,Q,r,r,r,*f,*f,T,?r,?*f")
(match_operand:DI 1 "general_operand" (match_operand:DI 1 "move_src_operand"
"rM,r,r,o*R,Q,i,*fM,RT,*f,*f,r"))] "rM,r,r,o*R,Q,i,*fM,RT,*f,*f,r"))]
"(register_operand (operands[0], DImode) "(register_operand (operands[0], DImode)
|| reg_or_0_operand (operands[1], DImode)) || reg_or_0_operand (operands[1], DImode))
...@@ -4355,44 +4323,32 @@ ...@@ -4355,44 +4323,32 @@
[(set_attr "type" "move,move") [(set_attr "type" "move,move")
(set_attr "length" "4,8")]) (set_attr "length" "4,8")])
;; This pattern forces (set (reg:SF ...) (const_double ...))
;; to be reloaded by putting the constant into memory when
;; reg is a floating point register.
;;
;; For integer registers we use ldil;ldo to set the appropriate
;; value.
;;
;; This must come before the movsf pattern, and it must be present
;; to handle obscure reloading cases.
(define_insn ""
[(set (match_operand:SF 0 "register_operand" "=?r,f")
(match_operand:SF 1 "" "?F,m"))]
"GET_CODE (operands[1]) == CONST_DOUBLE
&& operands[1] != CONST0_RTX (SFmode)
&& ! TARGET_SOFT_FLOAT"
"* return (which_alternative == 0 ? pa_singlemove_string (operands)
: \" fldw%F1 %1,%0\");"
[(set_attr "type" "move,fpload")
(set_attr "length" "8,4")])
(define_expand "movsf" (define_expand "movsf"
[(set (match_operand:SF 0 "general_operand" "") [(set (match_operand:SF 0 "general_operand" "")
(match_operand:SF 1 "general_operand" ""))] (match_operand:SF 1 "general_operand" ""))]
"" ""
" "
{ {
/* Reject CONST_DOUBLE loads to floating point registers. */
if (GET_CODE (operands[1]) == CONST_DOUBLE
&& operands[1] != CONST0_RTX (SFmode)
&& REG_P (operands[0])
&& HARD_REGISTER_P (operands[0])
&& REGNO (operands[0]) >= 32)
FAIL;
if (pa_emit_move_sequence (operands, SFmode, 0)) if (pa_emit_move_sequence (operands, SFmode, 0))
DONE; DONE;
}") }")
;; Handle SFmode input reloads requiring %r1 as a scratch register.
(define_expand "reload_insf_r1"
[(set (match_operand:SF 0 "register_operand" "=Z")
(match_operand:SF 1 "non_hard_reg_operand" ""))
(clobber (match_operand:SI 2 "register_operand" "=&a"))]
""
"
{
if (pa_emit_move_sequence (operands, SFmode, operands[2]))
DONE;
/* We don't want the clobber emitted, so handle this ourselves. */
emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
DONE;
}")
;; Handle SFmode input reloads requiring a general register as a ;; Handle SFmode input reloads requiring a general register as a
;; scratch register. ;; scratch register.
(define_expand "reload_insf" (define_expand "reload_insf"
...@@ -4429,9 +4385,9 @@ ...@@ -4429,9 +4385,9 @@
(define_insn "" (define_insn ""
[(set (match_operand:SF 0 "move_dest_operand" [(set (match_operand:SF 0 "move_dest_operand"
"=f,!*r,f,*r,Q,Q,?*r,?f") "=f,!*r,f,*r,T,Q,?*r,?f")
(match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand"
"fG,!*rG,RQ,RQ,f,*rG,f,*r"))] "fG,!*rG,RT,RQ,f,*rG,f,*r"))]
"(register_operand (operands[0], SFmode) "(register_operand (operands[0], SFmode)
|| reg_or_0_operand (operands[1], SFmode)) || reg_or_0_operand (operands[1], SFmode))
&& !TARGET_SOFT_FLOAT && !TARGET_SOFT_FLOAT
...@@ -4451,9 +4407,9 @@ ...@@ -4451,9 +4407,9 @@
(define_insn "" (define_insn ""
[(set (match_operand:SF 0 "move_dest_operand" [(set (match_operand:SF 0 "move_dest_operand"
"=f,!*r,f,*r,Q,Q") "=f,!*r,f,*r,T,Q")
(match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand"
"fG,!*rG,RQ,RQ,f,*rG"))] "fG,!*rG,RT,RQ,f,*rG"))]
"(register_operand (operands[0], SFmode) "(register_operand (operands[0], SFmode)
|| reg_or_0_operand (operands[1], SFmode)) || reg_or_0_operand (operands[1], SFmode))
&& !TARGET_SOFT_FLOAT && !TARGET_SOFT_FLOAT
...@@ -5408,7 +5364,7 @@ ...@@ -5408,7 +5364,7 @@
}") }")
(define_insn "umulsidi3" (define_insn "umulsidi3"
[(set (match_operand:DI 0 "nonimmediate_operand" "=f") [(set (match_operand:DI 0 "register_operand" "=f")
(mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f")) (mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f"))
(zero_extend:DI (match_operand:SI 2 "nonimmediate_operand" "f"))))] (zero_extend:DI (match_operand:SI 2 "nonimmediate_operand" "f"))))]
"TARGET_PA_11 && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT" "TARGET_PA_11 && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT"
...@@ -5417,7 +5373,7 @@ ...@@ -5417,7 +5373,7 @@
(set_attr "length" "4")]) (set_attr "length" "4")])
(define_insn "" (define_insn ""
[(set (match_operand:DI 0 "nonimmediate_operand" "=f") [(set (match_operand:DI 0 "register_operand" "=f")
(mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f")) (mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f"))
(match_operand:DI 2 "uint32_operand" "f")))] (match_operand:DI 2 "uint32_operand" "f")))]
"TARGET_PA_11 && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT && !TARGET_64BIT" "TARGET_PA_11 && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT && !TARGET_64BIT"
...@@ -5426,7 +5382,7 @@ ...@@ -5426,7 +5382,7 @@
(set_attr "length" "4")]) (set_attr "length" "4")])
(define_insn "" (define_insn ""
[(set (match_operand:DI 0 "nonimmediate_operand" "=f") [(set (match_operand:DI 0 "register_operand" "=f")
(mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f")) (mult:DI (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "f"))
(match_operand:DI 2 "uint32_operand" "f")))] (match_operand:DI 2 "uint32_operand" "f")))]
"TARGET_PA_11 && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT && TARGET_64BIT" "TARGET_PA_11 && ! TARGET_DISABLE_FPREGS && ! TARGET_SOFT_FLOAT && TARGET_64BIT"
......
...@@ -234,24 +234,134 @@ ...@@ -234,24 +234,134 @@
return IS_INDEX_ADDR_P (op) && memory_address_p (mode, op); return IS_INDEX_ADDR_P (op) && memory_address_p (mode, op);
}) })
;; True iff OP is a register plus base memory operand.
(define_predicate "reg_plus_base_memory_operand"
(match_code "subreg,mem")
{
if (GET_MODE (op) != mode)
return false;
/* Before reload, a (SUBREG (MEM...)) forces reloading into a register. */
if (reload_completed && GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
if (! MEM_P (op))
return false;
op = XEXP (op, 0);
if (GET_CODE (op) != PLUS)
return false;
if (REG_P (XEXP (op, 0)) && REG_OK_FOR_BASE_P (XEXP (op, 0)))
return GET_CODE (XEXP (op, 1)) == CONST_INT;
return false;
})
;; True iff OP is a base14 operand.
(define_predicate "base14_operand"
(match_code "const_int")
{
if (!INT_14_BITS (op))
return false;
/* Although this may not be necessary, we require that the
base value is correctly aligned for its mode as this is
assumed in the instruction encoding. */
switch (mode)
{
case QImode:
case HImode:
return true;
case SImode:
case SFmode:
case SCmode:
return (INTVAL (op) % 4) == 0;
case DImode:
case DFmode:
case DCmode:
return (INTVAL (op) % 8) == 0;
default:
break;
}
return false;
})
;; True iff the operand OP can be used as the destination operand of ;; True iff the operand OP can be used as the destination operand of
;; an integer store. This also implies the operand could be used as ;; an integer store. This also implies the operand could be used as
;; the source operand of an integer load. Symbolic, lo_sum and indexed ;; the source operand of an integer load. LO_SUM DLT and indexed
;; memory operands are not allowed. We accept reloading pseudos and ;; memory operands are not allowed. We accept reloading pseudos and
;; other memory operands. ;; other memory operands.
(define_predicate "integer_store_memory_operand" (define_predicate "integer_store_memory_operand"
(match_code "reg,mem") (match_code "reg,mem")
{ {
return ((reload_in_progress if (reload_in_progress
&& REG_P (op) && REG_P (op)
&& REGNO (op) >= FIRST_PSEUDO_REGISTER && REGNO (op) >= FIRST_PSEUDO_REGISTER
&& reg_renumber [REGNO (op)] < 0) && reg_renumber [REGNO (op)] < 0)
|| (MEM_P (op) return true;
&& (reload_in_progress || memory_address_p (mode, XEXP (op, 0)))
&& !symbolic_memory_operand (op, VOIDmode) if (reg_plus_base_memory_operand (op, mode))
&& !IS_LO_SUM_DLT_ADDR_P (XEXP (op, 0)) {
&& !IS_INDEX_ADDR_P (XEXP (op, 0)))); /* Extract CONST_INT operand. */
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
op = XEXP (op, 0);
op = REG_P (XEXP (op, 0)) ? XEXP (op, 1) : XEXP (op, 0);
return base14_operand (op, mode) || INT_5_BITS (op);
}
if (!MEM_P (op))
return false;
return ((reload_in_progress || memory_address_p (mode, XEXP (op, 0)))
&& !IS_LO_SUM_DLT_ADDR_P (XEXP (op, 0))
&& !IS_INDEX_ADDR_P (XEXP (op, 0)));
})
;; True iff the operand OP can be used as the destination operand of
;; a floating point store. This also implies the operand could be used as
;; the source operand of a floating point load. LO_SUM DLT and indexed
;; memory operands are not allowed. Symbolic operands are accepted if
;; INT14_OK_STRICT is true. We accept reloading pseudos and other memory
;; operands.
(define_predicate "floating_point_store_memory_operand"
(match_code "reg,mem")
{
if (reload_in_progress
&& REG_P (op)
&& REGNO (op) >= FIRST_PSEUDO_REGISTER
&& reg_renumber [REGNO (op)] < 0)
return true;
if (reg_plus_base_memory_operand (op, mode))
{
/* Extract CONST_INT operand. */
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
op = XEXP (op, 0);
op = REG_P (XEXP (op, 0)) ? XEXP (op, 1) : XEXP (op, 0);
return ((TARGET_PA_20
&& !TARGET_ELF32
&& base14_operand (op, mode))
|| INT_5_BITS (op));
}
if (!MEM_P (op))
return false;
return ((reload_in_progress || memory_address_p (mode, XEXP (op, 0)))
&& (INT14_OK_STRICT || !symbolic_memory_operand (op, VOIDmode))
&& !IS_LO_SUM_DLT_ADDR_P (XEXP (op, 0))
&& !IS_INDEX_ADDR_P (XEXP (op, 0)));
}) })
;; Return true iff OP is an integer register. ;; Return true iff OP is an integer register.
...@@ -302,7 +412,7 @@ ...@@ -302,7 +412,7 @@
if (GET_CODE (op) == SUBREG) if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op); op = SUBREG_REG (op);
if (GET_CODE (op) != MEM || symbolic_memory_operand (op, mode)) if (! MEM_P (op))
return false; return false;
op = XEXP (op, 0); op = XEXP (op, 0);
...@@ -484,7 +594,10 @@ ...@@ -484,7 +594,10 @@
op = SUBREG_REG (op); op = SUBREG_REG (op);
if (!MEM_P (op)) if (!MEM_P (op))
return false; return false;
return pa_symbolic_expression_p (XEXP (op, 0)); op = XEXP (op, 0);
if (GET_CODE (op) == LO_SUM)
op = XEXP (op, 1);
return pa_symbolic_expression_p (op);
}) })
;; True iff OP is a symbolic operand. ;; True iff OP is a symbolic operand.
...@@ -507,9 +620,9 @@ ...@@ -507,9 +620,9 @@
|| GET_CODE (XEXP (op, 0)) == LABEL_REF) || GET_CODE (XEXP (op, 0)) == LABEL_REF)
&& GET_CODE (XEXP (op, 1)) == CONST_INT); && GET_CODE (XEXP (op, 1)) == CONST_INT);
default: default:
gcc_unreachable (); break;
} }
return true; return false;
}) })
;; Return true if OP is a symbolic operand for the TLS Global Dynamic model. ;; Return true if OP is a symbolic operand for the TLS Global Dynamic model.
......
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