diff options
author | Jiong Wang <jiong.wang@arm.com> | 2015-06-26 14:00:56 +0000 |
---|---|---|
committer | Jiong Wang <jiwang@gcc.gnu.org> | 2015-06-26 14:00:56 +0000 |
commit | 1b1e81f847a651bef0fff52d4dc5d09d9e521bcc (patch) | |
tree | 64b16d72cff8de0a9ba7d3f8cb5d1b43cdde3f87 /gcc/config/aarch64/iterators.md | |
parent | b175b679a4ec31502b1eb6752265f7be09ba9c08 (diff) | |
download | gcc-1b1e81f847a651bef0fff52d4dc5d09d9e521bcc.zip gcc-1b1e81f847a651bef0fff52d4dc5d09d9e521bcc.tar.gz gcc-1b1e81f847a651bef0fff52d4dc5d09d9e521bcc.tar.bz2 |
[AArch64][2/2] Implement -fpic for -mcmodel=small
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.
From-SVN: r225017
Diffstat (limited to 'gcc/config/aarch64/iterators.md')
-rw-r--r-- | gcc/config/aarch64/iterators.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index 498358a..b19d3d7 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -657,6 +657,10 @@ (define_mode_attr insn_count [(OI "8") (CI "12") (XI "16")]) +;; -fpic small model GOT reloc modifers: gotpage_lo15/lo14 for ILP64/32. +;; No need of iterator for -fPIC as it use got_lo12 for both modes. +(define_mode_attr got_modifier [(SI "gotpage_lo14") (DI "gotpage_lo15")]) + ;; ------------------------------------------------------------------- ;; Code Iterators ;; ------------------------------------------------------------------- |