diff options
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r-- | gcc/config/arm/arm.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 7e18e896ce0..df9e1596642 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -8504,7 +8504,16 @@ arm_tls_referenced_p (rtx x) { const_rtx x = *iter; if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (x) != 0) - return true; + { + /* ARM currently does not provide relocations to encode TLS variables + into AArch32 instructions, only data, so there is no way to + currently implement these if a literal pool is disabled. */ + if (arm_disable_literal_pool) + sorry ("accessing thread-local storage is not currently supported " + "with -mpure-code or -mslow-flash-data"); + + return true; + } /* Don't recurse into UNSPEC_TLS looking for TLS symbols; these are TLS offsets, not real symbol references. */ @@ -16207,6 +16216,7 @@ static void push_minipool_fix (rtx_insn *insn, HOST_WIDE_INT address, rtx *loc, machine_mode mode, rtx value) { + gcc_assert (!arm_disable_literal_pool); Mfix * fix = (Mfix *) obstack_alloc (&minipool_obstack, sizeof (* fix)); fix->insn = insn; @@ -16258,10 +16268,6 @@ push_minipool_fix (rtx_insn *insn, HOST_WIDE_INT address, rtx *loc, int arm_max_const_double_inline_cost () { - /* Let the value get synthesized to avoid the use of literal pools. */ - if (arm_disable_literal_pool) - return 99; - return ((optimize_size || arm_ld_sched) ? 3 : 4); } @@ -17208,6 +17214,11 @@ arm_reorg (void) if (!optimize) split_all_insns_noflow (); + /* Make sure we do not attempt to create a literal pool even though it should + no longer be necessary to create any. */ + if (arm_disable_literal_pool) + return ; + minipool_fix_head = minipool_fix_tail = NULL; /* The first insn must always be a note, or the code below won't |