diff options
author | Olivier Hainque <hainque@adacore.com> | 2020-11-04 08:05:06 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@adacore.com> | 2020-11-05 18:31:28 +0000 |
commit | 7fa1b2c8dac00eefadb1f0d459fd716027aa1b67 (patch) | |
tree | 54fd0d9e8274a937d797a7c81e4c263b9af32bf9 /gcc | |
parent | 2f93a2a03a343a29f614a530d7657f1ed6347ed5 (diff) | |
download | gcc-7fa1b2c8dac00eefadb1f0d459fd716027aa1b67.zip gcc-7fa1b2c8dac00eefadb1f0d459fd716027aa1b67.tar.gz gcc-7fa1b2c8dac00eefadb1f0d459fd716027aa1b67.tar.bz2 |
Handle use of r18 as a TCB pointer on aarch64-vxworks
Pick an alternate static chain regnum and document that
the port needs to be configured to issue -ffixed-r18 by
default. The current definition of TARGET_OS_USES_R18 is
not honored by the common part of the back-end.
2020-11-04 Olivier Hainque <hainque@adacore.com>
gcc/
* config/aarch64/aarch64-vxworks.h (TARGET_OS_USES_R18):
Remove definition.
(STATIC_CHAIN_REGNUM): Redefine to 9.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/aarch64/aarch64-vxworks.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/config/aarch64/aarch64-vxworks.h b/gcc/config/aarch64/aarch64-vxworks.h index e22f2f5..9e172c1 100644 --- a/gcc/config/aarch64/aarch64-vxworks.h +++ b/gcc/config/aarch64/aarch64-vxworks.h @@ -60,12 +60,14 @@ along with GCC; see the file COPYING3. If not see #undef STACK_CHECK_PROTECT #define STACK_CHECK_PROTECT 16384 -/* The VxWorks environment on aarch64 is llvm-based only, uses R18 as - a TCB pointer. */ - +/* The VxWorks environment on aarch64 is llvm-based. */ #undef VXWORKS_PERSONALITY #define VXWORKS_PERSONALITY "llvm" -#undef TARGET_OS_USES_R18 -#define TARGET_OS_USES_R18 1 +/* VxWorks uses R18 as a TCB pointer. We must pick something else as + the static chain and R18 needs to be claimed "fixed". Until we + arrange to override the common parts of the port family to + acknowledge the latter, configure --with-specs="-ffixed-r18". */ +#undef STATIC_CHAIN_REGNUM +#define STATIC_CHAIN_REGNUM 9 |