On 19 June 2015 at 10:15, Jiong Wang <jiong.w...@arm.com> wrote: > > Currently, TLS IE is supported on small model only. This patch implement > TLS Initial-exec model support for AArch64 tiny memory model. > > Under tiny model, we only allow 1M loadable segment size, one single ldr > instruction is enough for addressing the got entry for TLS IE directly. > > The code sequence is: > > A: mrs tp, tpidr_el0 > B0: ldr t0, :gottprel:x1 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 x1 > B1: add t0, t0, tp > > B0 and B1 should not be scheduled, as the pattern will be recognized > later for linker IE model to LE model optimization. > > 2015-06-19 Marcus Shawcroft <marcus.shawcr...@arm.com> > Jiong Wang <jiong.w...@arm.com> > > gcc/ > * config/aarch64/aarch64.md (UNSPEC_GOTTINYTLS): New UNSPEC. > (tlsie_tiny_<mode>): New define_insn. > (tlsie_tiny_sidi): Ditto. > * config/aarch64/aarch64-protos.h (aarch64_symbol_type): Define > SYMBOL_TINY_TLSIE. > (aarch64_symbol_context): New comment for SYMBOL_TINY_TLSIE. > * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Support > SYMBOL_TINY_TLSIE. > (aarch64_expand_mov_immediate): Ditto. > (aarch64_print_operand): Ditto. > (arch64_classify_tls_symbol): Ditto. > > gcc/testsuite/ > * gcc.target/aarch64/tlsie_tiny.c: New testcase. > > -- > Regards, > Jiong >
OK /Marcus