Skip to content

Commit 0efce03

Browse files
committed
arc: Set tp regno to 26 for Zephyr
Zephyr needs a consistent thread pointer register which is respected by all code, not just the OS. Use register 26 to be compatible with existing Zephyr source. Signed-off-by: Keith Packard <[email protected]>
1 parent 74e7f96 commit 0efce03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcc/config/arc/elf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ along with GCC; see the file COPYING3. If not see
5555
# endif
5656
#endif
5757

58-
/* Bare-metal toolchains do not need a thread pointer register. */
58+
/* Zephyr toolchain use register 26 as a thread pointer register. */
5959
#undef TARGET_ARC_TP_REGNO_DEFAULT
60-
#define TARGET_ARC_TP_REGNO_DEFAULT -1
60+
#define TARGET_ARC_TP_REGNO_DEFAULT 26
6161

6262
/* Indexed loads are default. */
6363
#undef TARGET_INDEXED_LOADS_DEFAULT

0 commit comments

Comments
 (0)