- Add add-checks-to-avoid-spoiling-if-conversion.patch - Add add-option-fallow-store-data-races.patch - Add complete-struct-reorg.patch - Add cse-in-vectorization.patch - Add enable-simd-math.patch - Add fix-ICE-avoid-issueing-loads-in-SM-when-possible.patch - Add fix-ICE-in-compute_live_loop_exits.patch - Add fix-ICE-in-copy_reference_ops_from_ref.patch - Add fix-ICE-in-declare-return-variable.patch - Add fix-ICE-in-exact_div.patch - Add fix-ICE-in-gimple_op.patch - Add fix-ICE-in-model_update_limit_points_in_group.patch - Add fix-ICE-in-reload.patch - Add fix-ICE-in-store_constructor.patch - Add fix-ICE-in-vec.patch - Add fix-ICE-in-vect_create_epilog_for_reduction.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_2.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_3.patch - Add fix-ICE-in-vect_get_vec_def_for_stmt_copy.patch - Add fix-ICE-in-vect_slp_analyze_node_operations.patch - Add fix-ICE-in-vect_stmt_to_vectorize.patch - Add fix-ICE-in-vect_transform_stmt.patch - Add fix-ICE-in-vectorizable_condition.patch - Add fix-ICE-in-verify_ssa.patch - Add fix-ICE-statement-uses-released-SSA-name.patch - Add fix-ICE-when-vectorizing-nested-cycles.patch - Add fix-SSA-update-for-vectorizer-epilogue.patch - Add fix-do-not-build-op.patch - Add fix-load-eliding-in-SM.patch - Add fix-wrong-vectorizer-code.patch - Add generate-csel-for-arrayref.patch - Add ipa-const-prop-self-recursion-bugfix.patch - Add ipa-const-prop.patch - Add ipa-struct-reorg-bugfix.patch - Add ipa-struct-reorg.patch - Add medium-code-mode.patch - Add reduction-chain-slp-option.patch - Add reductions-slp-enhancement.patch - Add simplify-removing-subregs.patch - Add tighten-range-for-generating-csel.patch - Add vectorization-enhancement.patch - Add add-checks-to-avoid-spoiling-if-conversion.patch - Add add-option-fallow-store-data-races.patch - Add complete-struct-reorg.patch - Add cse-in-vectorization.patch - Add enable-simd-math.patch - Add fix-ICE-avoid-issueing-loads-in-SM-when-possible.patch - Add fix-ICE-in-compute_live_loop_exits.patch - Add fix-ICE-in-copy_reference_ops_from_ref.patch - Add fix-ICE-in-declare-return-variable.patch - Add fix-ICE-in-exact_div.patch - Add fix-ICE-in-gimple_op.patch - Add fix-ICE-in-model_update_limit_points_in_group.patch - Add fix-ICE-in-reload.patch - Add fix-ICE-in-store_constructor.patch - Add fix-ICE-in-vec.patch - Add fix-ICE-in-vect_create_epilog_for_reduction.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_2.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_3.patch - Add fix-ICE-in-vect_get_vec_def_for_stmt_copy.patch - Add fix-ICE-in-vect_slp_analyze_node_operations.patch - Add fix-ICE-in-vect_stmt_to_vectorize.patch - Add fix-ICE-in-vect_transform_stmt.patch - Add fix-ICE-in-vectorizable_condition.patch - Add fix-ICE-in-verify_ssa.patch - Add fix-ICE-statement-uses-released-SSA-name.patch - Add fix-ICE-when-vectorizing-nested-cycles.patch - Add fix-SSA-update-for-vectorizer-epilogue.patch - Add fix-do-not-build-op.patch - Add fix-load-eliding-in-SM.patch - Add fix-wrong-vectorizer-code.patch - Add generate-csel-for-arrayref.patch - Add ipa-const-prop-self-recursion-bugfix.patch - Add ipa-const-prop.patch - Add ipa-struct-reorg-bugfix.patch - Add ipa-struct-reorg.patch - Add medium-code-mode.patch - Add reduction-chain-slp-option.patch - Add reductions-slp-enhancement.patch - Add simplify-removing-subregs.patch - Add tighten-range-for-generating-csel.patch - Add vectorization-enhancement.patch
88 lines
2.3 KiB
Diff
88 lines
2.3 KiB
Diff
This backport contains 1 patch from gcc main stream tree.
|
|
The commit id of these patchs list as following in the order of time.
|
|
|
|
0001-aarch64-Fix-SYMBOL_TINY_GOT-handling-for-ILP32-PR942.patch:
|
|
d91480dee934478063fe5945b73ff3c108e40a91
|
|
|
|
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
|
|
index b0cbb6e2d55..58d38f74bde 100644
|
|
--- a/gcc/config/aarch64/aarch64.c
|
|
+++ b/gcc/config/aarch64/aarch64.c
|
|
@@ -2739,8 +2739,21 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm,
|
|
}
|
|
|
|
case SYMBOL_TINY_GOT:
|
|
- emit_insn (gen_ldr_got_tiny (dest, imm));
|
|
- return;
|
|
+ {
|
|
+ rtx insn;
|
|
+ machine_mode mode = GET_MODE (dest);
|
|
+
|
|
+ if (mode == ptr_mode)
|
|
+ insn = gen_ldr_got_tiny (mode, dest, imm);
|
|
+ else
|
|
+ {
|
|
+ gcc_assert (mode == Pmode);
|
|
+ insn = gen_ldr_got_tiny_sidi (dest, imm);
|
|
+ }
|
|
+
|
|
+ emit_insn (insn);
|
|
+ return;
|
|
+ }
|
|
|
|
case SYMBOL_TINY_TLSIE:
|
|
{
|
|
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
|
|
index 7ad4e918578..c7c4d1dd519 100644
|
|
--- a/gcc/config/aarch64/aarch64.md
|
|
+++ b/gcc/config/aarch64/aarch64.md
|
|
@@ -6766,13 +6766,23 @@
|
|
[(set_attr "type" "load_4")]
|
|
)
|
|
|
|
-(define_insn "ldr_got_tiny"
|
|
- [(set (match_operand:DI 0 "register_operand" "=r")
|
|
- (unspec:DI [(match_operand:DI 1 "aarch64_valid_symref" "S")]
|
|
- UNSPEC_GOTTINYPIC))]
|
|
+(define_insn "@ldr_got_tiny_<mode>"
|
|
+ [(set (match_operand:PTR 0 "register_operand" "=r")
|
|
+ (unspec:PTR [(match_operand:PTR 1 "aarch64_valid_symref" "S")]
|
|
+ UNSPEC_GOTTINYPIC))]
|
|
""
|
|
- "ldr\\t%0, %L1"
|
|
- [(set_attr "type" "load_8")]
|
|
+ "ldr\t%<w>0, %L1"
|
|
+ [(set_attr "type" "load_<ldst_sz>")]
|
|
+)
|
|
+
|
|
+(define_insn "ldr_got_tiny_sidi"
|
|
+ [(set (match_operand:DI 0 "register_operand" "=r")
|
|
+ (zero_extend:DI
|
|
+ (unspec:SI [(match_operand:DI 1 "aarch64_valid_symref" "S")]
|
|
+ UNSPEC_GOTTINYPIC)))]
|
|
+ "TARGET_ILP32"
|
|
+ "ldr\t%w0, %L1"
|
|
+ [(set_attr "type" "load_4")]
|
|
)
|
|
|
|
(define_insn "aarch64_load_tp_hard"
|
|
diff --git a/gcc/testsuite/gcc.target/aarch64/pr94201.c b/gcc/testsuite/gcc.target/aarch64/pr94201.c
|
|
new file mode 100644
|
|
index 00000000000..69176169186
|
|
--- /dev/null
|
|
+++ b/gcc/testsuite/gcc.target/aarch64/pr94201.c
|
|
@@ -0,0 +1,13 @@
|
|
+/* { dg-do compile } */
|
|
+/* { dg-options "-mcmodel=tiny -mabi=ilp32 -fPIC" } */
|
|
+
|
|
+extern int bar (void *);
|
|
+extern long long a;
|
|
+
|
|
+int
|
|
+foo (void)
|
|
+{
|
|
+ a = 1;
|
|
+ return bar ((void *)bar);
|
|
+}
|
|
+
|