diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2020-05-24 19:41:13 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2020-05-27 18:42:37 -0700 |
commit | b76415508692fc0bc85515a8215b874c7e215431 (patch) | |
tree | 03d260b0819731385acd7b1fd8c08c981faeb2cf /gcc | |
parent | fe7ebef7fe4f9acb79658ed9db0749b07efc3105 (diff) | |
download | gcc-b76415508692fc0bc85515a8215b874c7e215431.zip gcc-b76415508692fc0bc85515a8215b874c7e215431.tar.gz gcc-b76415508692fc0bc85515a8215b874c7e215431.tar.bz2 |
gcc: xtensa: delegitimize UNSPEC_PLT
This fixes 'non-delegitimized UNSPEC 3 found in variable location' notes
issued when building libraries which interferes with running tests.
2020-05-27 Max Filippov <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (xtensa_delegitimize_address): New
function.
(TARGET_DELEGITIMIZE_ADDRESS): New macro.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/xtensa/xtensa.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 0a5ecd2..550c9cd 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -186,6 +186,8 @@ static HOST_WIDE_INT xtensa_constant_alignment (const_tree, HOST_WIDE_INT); static HOST_WIDE_INT xtensa_starting_frame_offset (void); static unsigned HOST_WIDE_INT xtensa_asan_shadow_offset (void); +static rtx xtensa_delegitimize_address (rtx); + /* These hooks specify assembly directives for creating certain kinds @@ -333,6 +335,9 @@ static unsigned HOST_WIDE_INT xtensa_asan_shadow_offset (void); #undef TARGET_HAVE_SPECULATION_SAFE_VALUE #define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed +#undef TARGET_DELEGITIMIZE_ADDRESS +#define TARGET_DELEGITIMIZE_ADDRESS xtensa_delegitimize_address + struct gcc_target targetm = TARGET_INITIALIZER; @@ -4424,4 +4429,23 @@ xtensa_asan_shadow_offset (void) return HOST_WIDE_INT_UC (0x10000000); } +static rtx +xtensa_delegitimize_address (rtx op) +{ + switch (GET_CODE (op)) + { + case CONST: + return xtensa_delegitimize_address (XEXP (op, 0)); + + case UNSPEC: + if (XINT (op, 1) == UNSPEC_PLT) + return XVECEXP(op, 0, 0); + break; + + default: + break; + } + return op; +} + #include "gt-xtensa.h" |