public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@linaro.org>
To: Jiong Wang <jiong.wang@arm.com>
Cc: Marcus Shawcroft <marcus.shawcroft@gmail.com>,
	gcc-patches <gcc-patches@gnu.org>
Subject: Re: [AArch64][TLSLE][3/3] Implement local executable mode for all memory model
Date: Thu, 27 Aug 2015 07:52:00 -0000	[thread overview]
Message-ID: <CAKdteOYN603DnpwdxEOtmOsd5yhFy92nNVoCB3nMkkVhxbyuRg@mail.gmail.com> (raw)
In-Reply-To: <n99fv3f5oo1.fsf@arm.com>

On 19 August 2015 at 16:21, Jiong Wang <jiong.wang@arm.com> wrote:
>
> Marcus Shawcroft writes:
>
>> On 21 May 2015 at 17:49, Jiong Wang <jiong.wang@arm.com> wrote:
>>
>>> 2015-05-14  Jiong Wang  <jiong.wang@arm.com>
>>> gcc/
>>>   * config/aarch64/aarch64.c (aarch64_print_operand): Support tls_size.
>>>   * config/aarch64/aarch64.md (tlsle): Choose proper instruction
>>>   sequences.
>>>   (tlsle_<mode>): New define_insn.
>>>   (tlsle_movsym_<mode>): Ditto.
>>>   * config/aarch64/constraints.md (Uta): New constraint.
>>>   (Utb): Ditto.
>>>   (Utc): Ditto.
>>>   (Utd): Ditto.
>>>
>>> gcc/testsuite/
>>>   * gcc.target/aarch64/tlsle.c: New test source.
>>>   * gcc.target/aarch64/tlsle12.c: New testcase.
>>>   * gcc.target/aarch64/tlsle24.c: New testcase.
>>>   * gcc.target/aarch64/tlsle32.c: New testcase.
>>>
>>
>>
>>   case SYMBOL_TLSLE:
>> -  asm_fprintf (asm_out_file, ":tprel_lo12_nc:");
>> +  if (aarch64_tls_size <= 12)
>> +    /* Make sure TLS offset fit into 12bit.  */
>> +    asm_fprintf (asm_out_file, ":tprel_lo12:");
>> +  else
>> +    asm_fprintf (asm_out_file, ":tprel_lo12_nc:");
>>    break;
>>
>> Use the existing classify_symbol mechanism we use throughout the
>> aarch64 backend.  Specifically rename SYMBOL_TLSLE as SYMBOL_TLSLE24
>> and introduce the 3 missing flavours then use the symbol
>> classification to control behaviour such as this modifier selection.
>
> Done.
>
> classified TLS symbol into the following sub-types according to the value of tls size.
>
>  SYMBOL_TLSLE12
>  SYMBOL_TLSLE24
>  SYMBOL_TLSLE32
>  SYMBOL_TLSLE48
>
> And On AArch64, instruction sequence for TLS LE under -mtls-size=32 will
> utilize the relocation modifier "tprel_g0_nc" together with MOVK, it's
> only supported in binutils since 2015-03-04 as PR gas/17843. So I
> adjusted tlsle32.c to make it robust by detecting whether there is such
> binutils support.
>

Hi,

I'm (still) using binutils-2.25, and I can see that 2 of these new
tests (tlsle12_1.c and tlsle24_1.c) fail at execution time on
aarch64*-none-elf targets.
Can you adjust the testcase?

Thanks

Christophe.

> OK for trunk?
>
> 2015-08-19  Marcus Shawcroft  <marcus.shawcroft@arm.com>
>             Jiong Wang  <jiong.wang@arm.com>
> gcc/
>   * config/aarch64/aarch64.c (initialize_aarch64_tls_size): Set default
>   tls size for tiny, small, large memory model.
>   (aarch64_load_symref_appropriately): Support new symbol types.
>   (aarch64_expand_mov_immediate): Likewise.
>   (aarch64_print_operand): Likewise.
>   (aarch64_classify_tls_symbol): Likewise.
>   * config/aarch64/aarch64-protos.h (aarch64_symbol_context): Likewise.
>   (aarch64_symbol_type): Likewise.
>   * config/aarch64/aarch64.md (tlsle): Deleted.
>   (tlsle12_<mode>): New define_insn.
>   (tlsle24_<mode>): Likewise.
>   (tlsle32_<mode>): Likewise.
>   (tlsle48_<mode>): Likewise.
>   * doc/sourcebuild.texi (AArch64-specific attributes): Document
>   "aarch64_tlsle32".
>
> gcc/testsuite/
>   * lib/target-supports.exp (check_effective_target_aarch64_tlsle32):
>   New test directive.
>   * gcc.target/aarch64/tlsle_1.x: New test source.
>   * gcc.target/aarch64/tlsle12.c: New testcase.
>   * gcc.target/aarch64/tlsle24.c: New testcase.
>   * gcc.target/aarch64/tlsle32.c: New testcase.
> --
> Regards,
> Jiong
>

  parent reply	other threads:[~2015-08-27  7:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 16:58 [AArch64][TLSLE][N/N] " Jiong Wang
2015-06-26 16:02 ` Marcus Shawcroft
2015-08-19 14:50   ` [AArch64][TLSLE][3/3] " Jiong Wang
2015-08-25  9:50     ` Marcus Shawcroft
2015-08-27  7:52     ` Christophe Lyon [this message]
2015-08-27  9:21       ` Jiong Wang
2015-08-27  9:41         ` Christophe Lyon
2015-08-27  9:53           ` Jiong Wang
2015-08-27 10:34             ` Jiong Wang
2015-08-27 13:23               ` Christophe Lyon
2015-08-27 13:36                 ` Jiong Wang
2015-08-27 13:45                   ` Christophe Lyon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKdteOYN603DnpwdxEOtmOsd5yhFy92nNVoCB3nMkkVhxbyuRg@mail.gmail.com \
    --to=christophe.lyon@linaro.org \
    --cc=gcc-patches@gnu.org \
    --cc=jiong.wang@arm.com \
    --cc=marcus.shawcroft@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).