From 575bb005a4d0b040b48f3ec1214fba93a0014722 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sun, 4 Apr 1993 18:08:33 -0600 Subject: [PATCH] pa.c (short_memory_operand): Delete. * pa.c (short_memory_operand): Delete. (emit_move_sequence): Do not use short_memory_operand When testing for secondary reloads for FP loads/stores. From-SVN: r4014 --- gcc/config/pa/pa.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 365f3c81efa..6edb348cbab 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -218,29 +218,6 @@ pic_operand (op, mode) return flag_pic && GET_CODE (op) == LABEL_REF; } -int -short_memory_operand (op, mode) - rtx op; - enum machine_mode mode; -{ - if (GET_CODE (op) == MEM) - { - if (GET_CODE (XEXP (op, 0)) == REG) - return 1; - else if (GET_CODE (XEXP (op, 0)) == PLUS) - { - rtx op1 = XEXP (XEXP (op, 0), 0); - rtx op2 = XEXP (XEXP (op, 0), 1); - - if (GET_CODE (op1) == REG) - return (GET_CODE (op2) == CONST_INT && INT_5_BITS (op2)); - else if (GET_CODE (op2) == REG) - return (GET_CODE (op1) == CONST_INT && INT_5_BITS (op1)); - } - } - return 0; -} - int fp_reg_operand (op, mode) rtx op; @@ -729,7 +706,9 @@ emit_move_sequence (operands, mode, scratch_reg) REG+D addresses where D does not fit in 5 bits. */ if (fp_reg_operand (operand0, mode) && GET_CODE (operand1) == MEM - && !short_memory_operand (operand1, mode) + /* Using DFmode forces only short displacements be be + recognized as valid in reg+d addressing modes. */ + && ! memory_address_p (DFmode, XEXP (operand1, 0)) && scratch_reg) { emit_move_insn (scratch_reg, XEXP (operand1 , 0)); @@ -739,7 +718,9 @@ emit_move_sequence (operands, mode, scratch_reg) } else if (fp_reg_operand (operand1, mode) && GET_CODE (operand0) == MEM - && !short_memory_operand (operand0, mode) + /* Using DFmode forces only short displacements be be + recognized as valid in reg+d addressing modes. */ + && ! memory_address_p (DFmode, XEXP (operand0, 0)) && scratch_reg) { emit_move_insn (scratch_reg, XEXP (operand0 , 0)); -- 2.30.2