X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gcc%2Fconfig%2Frs6000%2Frs6000.md;h=daa16a4fbad13f2a0f2aa5fd6224b7b473882f5d;hb=9e81cc8bdec038bfed40030f487580437d2d6f66;hp=25fed1ffa8f34fb1d23b08c3166955dd69c3cada;hpb=4a3d0b10a2b64ff78a6448240afe89c2b8d68076;p=gcc.git diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 25fed1ffa8f..daa16a4fbad 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -10339,6 +10339,15 @@ "TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL" "addis %0,%2,%1@toc@ha") +(define_insn "*largetoc_high_aix" + [(set (match_operand:P 0 "gpc_reg_operand" "=b*r") + (high:P + (unspec [(match_operand:P 1 "" "") + (match_operand:P 2 "gpc_reg_operand" "b")] + UNSPEC_TOCREL)))] + "TARGET_XCOFF && TARGET_CMODEL != CMODEL_SMALL" + "addis %0,%1@u(%2)") + (define_insn "*largetoc_high_plus" [(set (match_operand:DI 0 "gpc_reg_operand" "=b*r") (high:DI @@ -10350,11 +10359,22 @@ "TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL" "addis %0,%2,%1+%3@toc@ha") -(define_insn "*largetoc_low" - [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r") - (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,!*r") - (match_operand:DI 2 "" "")))] - "TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL" +(define_insn "*largetoc_high_plus_aix" + [(set (match_operand:P 0 "gpc_reg_operand" "=b*r") + (high:P + (plus:P + (unspec [(match_operand:P 1 "" "") + (match_operand:P 2 "gpc_reg_operand" "b")] + UNSPEC_TOCREL) + (match_operand 3 "const_int_operand" "n"))))] + "TARGET_XCOFF && TARGET_CMODEL != CMODEL_SMALL" + "addis %0,%1+%3@u(%2)") + +(define_insn "*largetoc_low" + [(set (match_operand:P 0 "gpc_reg_operand" "=r,r") + (lo_sum:P (match_operand:P 1 "gpc_reg_operand" "b,!*r") + (match_operand:P 2 "" "")))] + "TARGET_TOC && TARGET_CMODEL != CMODEL_SMALL" "@ addi %0,%1,%2@l addic %0,%1,%2@l") @@ -10364,7 +10384,7 @@ (match_operand:P 1 "small_toc_ref" "R"))] "TARGET_TOC" "la %0,%a1" - "&& TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL && reload_completed" + "&& TARGET_CMODEL != CMODEL_SMALL && reload_completed" [(set (match_dup 0) (high:P (match_dup 1))) (set (match_dup 0) (lo_sum:P (match_dup 0) (match_dup 1)))])