Commit 81b98ef7 by Claudiu Zissulescu Committed by Claudiu Zissulescu

[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.

From-SVN: r246497
parent ac255185
2017-03-27 Claudiu Zissulescu <claziss@synopsys.com> 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): * config/arc/predicates.md (long_immediate_loadstore_operand):
Consider scaled addresses cases. Consider scaled addresses cases.
......
...@@ -469,7 +469,7 @@ EnumValue ...@@ -469,7 +469,7 @@ EnumValue
Enum(arc_fpu) String(fpud_all) Value(FPU_FPUD_ALL) Enum(arc_fpu) String(fpud_all) Value(FPU_FPUD_ALL)
mtp-regno= 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. Specify thread pointer register number.
mtp-regno=none mtp-regno=none
......
...@@ -53,3 +53,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -53,3 +53,7 @@ along with GCC; see the file COPYING3. If not see
# define MULTILIB_DEFAULTS { "mcpu=" ARC_MULTILIB_CPU_DEFAULT } # define MULTILIB_DEFAULTS { "mcpu=" ARC_MULTILIB_CPU_DEFAULT }
# endif # endif
#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
...@@ -74,3 +74,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -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 /* We do not have any MULTILIB_OPTIONS specified, so there are no
MULTILIB_DEFAULTS. */ MULTILIB_DEFAULTS. */
#undef 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment