From 9a89adb8c76cc64dab9bf62d1cdc08322f883604 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 14 Aug 2000 13:28:11 -0700 Subject: [PATCH] ia64.md (movdi): Delay calling ia64_expand_load_address. * config/ia64/ia64.md (movdi): Delay calling ia64_expand_load_address. (movdi_symbolic): New. From-SVN: r35685 --- gcc/ChangeLog | 5 +++++ gcc/config/ia64/ia64.md | 31 +++++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd08faede12..484a47e6de6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-08-14 Richard Henderson + + * config/ia64/ia64.md (movdi): Delay calling ia64_expand_load_address. + (movdi_symbolic): New. + 2000-08-14 Jim Wilson * config/ia64/ia64.h (ASM_SPEC): Pass -mconstant-gp and -mauto-pic diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md index 6a30393494e..4a68623c13c 100644 --- a/gcc/config/ia64/ia64.md +++ b/gcc/config/ia64/ia64.md @@ -351,14 +351,21 @@ "" " { + if (! reload_in_progress && ! reload_completed + && ! ia64_move_ok (operands[0], operands[1])) + operands[1] = force_reg (DImode, operands[1]); if (! TARGET_NO_PIC && symbolic_operand (operands[1], DImode)) { - ia64_expand_load_address (operands[0], operands[1]); + /* Before optimization starts, delay committing to any particular + type of PIC address load. If this function gets deferred, we + may acquire information that changes the value of the + sdata_symbolic_operand predicate. */ + if (rtx_equal_function_value_matters) + emit_insn (gen_movdi_symbolic (operands[0], operands[1])); + else + ia64_expand_load_address (operands[0], operands[1]); DONE; } - if (! reload_in_progress && ! reload_completed - && ! ia64_move_ok (operands[0], operands[1])) - operands[1] = force_reg (DImode, operands[1]); }") ;; Errata 72 workaround. @@ -407,6 +414,22 @@ [(set_attr "type" "A,A,L,M,M,F,I,I,M,M") (set_attr "predicable" "no")]) +;; This is used during early compilation to delay the decision on +;; how to refer to a variable as long as possible. This is especially +;; important between initial rtl generation and optimization for +;; deferred functions, since we may acquire additional information +;; on the variables used in the meantime. + +(define_insn_and_split "movdi_symbolic" + [(set (match_operand:DI 0 "register_operand" "=r") + (match_operand:DI 1 "symbolic_operand" "s")) + (use (reg:DI 1))] + "" + "* abort ();" + "" + [(const_int 0)] + "ia64_expand_load_address (operands[0], operands[1]); DONE;") + (define_insn "*movdi_internal_astep" [(set (match_operand:DI 0 "destination_operand" "=r,r,r,r, m, r,*f,*f,*f, Q, r,*b*e, r,*d, r,*c") -- 2.30.2