diff options
Diffstat (limited to 'gcc/config/pa/pa.c')
-rw-r--r-- | gcc/config/pa/pa.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 779243da221..7603858340d 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -912,9 +912,12 @@ static rtx legitimize_tls_address (rtx addr) { rtx ret, insn, tmp, t1, t2, tp; - enum tls_model model = SYMBOL_REF_TLS_MODEL (addr); - switch (model) + /* Currently, we can't handle anything but a SYMBOL_REF. */ + if (GET_CODE (addr) != SYMBOL_REF) + return addr; + + switch (SYMBOL_REF_TLS_MODEL (addr)) { case TLS_MODEL_GLOBAL_DYNAMIC: tmp = gen_reg_rtx (Pmode); @@ -1035,7 +1038,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, && !REG_POINTER (XEXP (x, 1))) return gen_rtx_PLUS (Pmode, XEXP (x, 1), XEXP (x, 0)); - if (PA_SYMBOL_REF_TLS_P (x)) + if (pa_tls_referenced_p (x)) return legitimize_tls_address (x); else if (flag_pic) return legitimize_pic_address (x, mode, gen_reg_rtx (Pmode)); @@ -1916,9 +1919,10 @@ pa_emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg) not consider them legitimate constants. Loop optimizations can call the emit_move_xxx with one as a source. */ if ((GET_CODE (operand1) != HIGH && immediate_operand (operand1, mode)) - || function_label_operand (operand1, VOIDmode) || (GET_CODE (operand1) == HIGH - && symbolic_operand (XEXP (operand1, 0), mode))) + && symbolic_operand (XEXP (operand1, 0), mode)) + || function_label_operand (operand1, VOIDmode) + || pa_tls_referenced_p (operand1)) { int ishighonly = 0; @@ -2625,14 +2629,14 @@ pa_output_move_double (rtx *operands) if (optype0 == REGOP) latehalf[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); else if (optype0 == OFFSOP) - latehalf[0] = adjust_address (operands[0], SImode, 4); + latehalf[0] = adjust_address_nv (operands[0], SImode, 4); else latehalf[0] = operands[0]; if (optype1 == REGOP) latehalf[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); else if (optype1 == OFFSOP) - latehalf[1] = adjust_address (operands[1], SImode, 4); + latehalf[1] = adjust_address_nv (operands[1], SImode, 4); else if (optype1 == CNSTOP) split_double (operands[1], &operands[1], &latehalf[1]); else @@ -7539,7 +7543,7 @@ pa_attr_length_millicode_call (rtx insn) if (!TARGET_LONG_CALLS && distance < MAX_PCREL17F_OFFSET) return 8; - if (TARGET_LONG_ABS_CALL && !flag_pic) + if (!flag_pic) return 12; return 24; @@ -8104,7 +8108,8 @@ pa_attr_length_indirect_call (rtx insn) return 12; if (TARGET_FAST_INDIRECT_CALLS - || (!TARGET_PORTABLE_RUNTIME + || (!TARGET_LONG_CALLS + && !TARGET_PORTABLE_RUNTIME && ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000) || distance < MAX_PCREL17F_OFFSET))) return 8; @@ -10397,7 +10402,7 @@ pa_legitimate_constant_p (enum machine_mode mode, rtx x) /* TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC are not legitimate constants. The other variants can't be handled by the move patterns after reload starts. */ - if (PA_SYMBOL_REF_TLS_P (x)) + if (pa_tls_referenced_p (x)) return false; if (TARGET_64BIT && GET_CODE (x) == CONST_DOUBLE) |