diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2017-03-27 10:56:24 +0000 |
---|---|---|
committer | Claudiu Zissulescu <claziss@synopsys.com> | 2017-03-27 10:56:24 +0000 |
commit | 426e199938bee2f3866357499b866a4da1146d44 (patch) | |
tree | d10aad0096fd2332432285048339e611ababf8b8 | |
parent | 9ce8d2255c2ec73b7cc305f8ee7dda22c493b329 (diff) |
[ARC] Disable TP register when building for bare metal.
gcc/
2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
* config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
* config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@246497 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/arc/arc.opt | 2 | ||||
-rw-r--r-- | gcc/config/arc/elf.h | 4 | ||||
-rw-r--r-- | gcc/config/arc/linux.h | 4 |
4 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 598f03d42cc..2740aa6a89d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2017-03-27 Claudiu Zissulescu <claziss@synopsys.com> + * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define. + * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise. + * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT. + +2017-03-27 Claudiu Zissulescu <claziss@synopsys.com> + * config/arc/predicates.md (long_immediate_loadstore_operand): Consider scaled addresses cases. diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt index 17af7368937..6060ded9911 100644 --- a/gcc/config/arc/arc.opt +++ b/gcc/config/arc/arc.opt @@ -469,7 +469,7 @@ EnumValue Enum(arc_fpu) String(fpud_all) Value(FPU_FPUD_ALL) mtp-regno= -Target RejectNegative Joined UInteger Var(arc_tp_regno) Init(25) +Target RejectNegative Joined UInteger Var(arc_tp_regno) Init(TARGET_ARC_TP_REGNO_DEFAULT) Specify thread pointer register number. mtp-regno=none diff --git a/gcc/config/arc/elf.h b/gcc/config/arc/elf.h index d2106c54f02..2b572a52322 100644 --- a/gcc/config/arc/elf.h +++ b/gcc/config/arc/elf.h @@ -53,3 +53,7 @@ along with GCC; see the file COPYING3. If not see # define MULTILIB_DEFAULTS { "mcpu=" ARC_MULTILIB_CPU_DEFAULT } # endif #endif + +/* Bare-metal toolchains do not need a thread pointer register. */ +#undef TARGET_ARC_TP_REGNO_DEFAULT +#define TARGET_ARC_TP_REGNO_DEFAULT -1 diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h index 10c291cc432..6e1a96efc23 100644 --- a/gcc/config/arc/linux.h +++ b/gcc/config/arc/linux.h @@ -74,3 +74,7 @@ along with GCC; see the file COPYING3. If not see /* We do not have any MULTILIB_OPTIONS specified, so there are no MULTILIB_DEFAULTS. */ #undef MULTILIB_DEFAULTS + +/* Linux toolchains use r25 as the thread pointer register. */ +#undef TARGET_ARC_TP_REGNO_DEFAULT +#define TARGET_ARC_TP_REGNO_DEFAULT 25 |