diff options
author | Peter Smith <peter.smith@linaro.org> | 2019-01-10 16:08:23 +0000 |
---|---|---|
committer | Peter Smith <peter.smith@linaro.org> | 2019-01-10 16:08:23 +0000 |
commit | 1811e48b7b5ce217b9999a85a90a194d13be36ff (patch) | |
tree | 2a40571c46957e88eca729f5c0d40f91bb84bf69 /llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | |
parent | 62df5eed16a07c4dd183c71d69d6858b5fa19652 (diff) | |
download | bcm5719-llvm-1811e48b7b5ce217b9999a85a90a194d13be36ff.tar.gz bcm5719-llvm-1811e48b7b5ce217b9999a85a90a194d13be36ff.zip |
[ELF] Fix ARM and Thumb V7PILongThunk overflow behavior.
When the range between the source and target of a V7PILongThunk exceeded an
int32 we would trigger a relocation out of range error for the
R_ARM_MOVT_PREL or R_ARM_THM_MOVT_PREL relocation. This case can happen when
linking the linux kernel as it is loaded above 0xf0000000.
There are two parts to the fix.
- Remove the overflow check for R_ARM_MOVT_PREL or R_ARM_THM_MOVT_PREL. The
ELF for the ARM Architecture document defines these relocations as having no
overflow checking so the check was spurious.
- Use int64_t for the offset calculation, in line with similar thunks so
that PC + (S - P) < 32-bits. This results in less surprising disassembly.
Differential Revision: https://reviews.llvm.org/D56396
llvm-svn: 350836
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp')
0 files changed, 0 insertions, 0 deletions