This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64][2/2] Implement -fpic for -mcmodel=small
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: Jiong Wang <jiong dot wang at arm dot com>
- Cc: gcc-patches <gcc-patches at gnu dot org>
- Date: Fri, 26 Jun 2015 13:52:12 +0100
- Subject: Re: [AArch64][2/2] Implement -fpic for -mcmodel=small
- Authentication-results: sourceware.org; auth=none
- References: <n99mw0zwmz7 dot fsf at arm dot com> <CAFqB+PwwScGMZdnHK3_xmkV4LCVqK_=WkhP3Nq_wR9cz55pqYA at mail dot gmail dot com> <n99h9py1sep dot fsf at arm dot com> <CAFqB+PxAdgcFJO34d7PQqgjGhUOcVHxwwqKi7D9OZAUNZQYtrA at mail dot gmail dot com> <n99fv5e24uc dot fsf at arm dot com> <n99egky24n9 dot fsf at arm dot com>
On 26 June 2015 at 10:32, Jiong Wang <jiong.wang@arm.com> wrote:
>
> This patch respin https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01804.html.
>
> A new symbol classification "SYMBOL_SMALL_GOT_28K" added to represent symbol
> which needs go through GOT table and it's under -fpic/-mcmodel-small. the "_28K"
> suffix can reflect the symbol's attribute better, and by introducing this new
> symbol type, we could avoid checking aarch64_cmodel at some extent
> though still needs the check somewhere.
>
> All other code logic not changed.
>
> OK for trunk?
>
> Thanks.
>
> 2015-06-26 Jiong. Wang <jiong.wang@arm.com>
>
> gcc/
> * config/aarch64/aarch64-protos.h (aarch64_symbol_type): New type
> SYMBOL_SMALL_GOT_28K.
> * config/aarch64/aarch64.md: (ldr_got_small_<mode>): Support new GOT
> relocation modifiers.
> (unspec): New enum "UNSPEC_GOTMALLPIC28K.
> (ldr_got_small_28k_<mode>): New.
> (ldr_got_small_28k_sidi): New.
> * config/aarch64/iterators.md (got_modifier): New mode iterator.
> * config/aarch64/aarch64-otps.h (aarch64_code_model): New model.
> * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Support
> SYMBOL_SMALL_GOT_28K.
> (aarch64_rtx_costs): Add costs for new instruction sequences.
> (initialize_aarch64_code_model): Initialize new model.
> (aarch64_classify_symbol): Recognize new model and new symbol classification.
> (aarch64_asm_preferred_eh_data_format): Support new model.
> (aarch64_load_symref_appropriately): Generate new instruction
> sequences for -fpic.
> (TARGET_USE_PSEUDO_PIC_REG): New definition.
> (aarch64_use_pseudo_pic_reg): New function.
>
> gcc/testsuite/
> * gcc.target/aarch64/pic-small.c: New testcase.
OK, Thanks Jiong. Could you prepare a NEWS entry for this change?
Cheers
/Marcus