]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[ARC] Disable TP register when building for bare metal.
authorClaudiu Zissulescu <claziss@synopsys.com>
Mon, 27 Mar 2017 10:56:24 +0000 (12:56 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Mon, 27 Mar 2017 10:56:24 +0000 (12:56 +0200)
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

gcc/ChangeLog
gcc/config/arc/arc.opt
gcc/config/arc/elf.h
gcc/config/arc/linux.h

index 598f03d42cce1fd4914236216fe215ca9d5d6d88..2740aa6a89d96a8470f827346cb24ca8271b47dc 100644 (file)
@@ -1,3 +1,9 @@
+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):
index 17af7368937126c622f56583d75c25e4d1820db5..6060ded9911360eaa26edfd7bb2f12531d1928f6 100644 (file)
@@ -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
index d2106c54f023f8844000961477a0d8d08a30c89b..2b572a52322010cc922cb05930ba086ac0208ebd 100644 (file)
@@ -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
index 10c291cc432d9c75cb3845fd7663792412fb547f..6e1a96efc23a18d0e5d70185a41fa9aa69ad8520 100644 (file)
@@ -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