aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorChih-Mao Chen <pkmx.tw@gmail.com>2019-04-09 11:39:23 +0000
committerChih-Mao Chen <pkmx.tw@gmail.com>2019-04-09 11:39:23 +0000
commit949570ce39da590c59fecb4cd24501351aaa64fb (patch)
tree158f41131501001a75f888943bdbd9f33ea9592c /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent965c5812f43809826772a31b613ba56894e47627 (diff)
downloadllvm-949570ce39da590c59fecb4cd24501351aaa64fb.zip
llvm-949570ce39da590c59fecb4cd24501351aaa64fb.tar.gz
llvm-949570ce39da590c59fecb4cd24501351aaa64fb.tar.bz2
[RISCV] Fix range check for HI20/LO12/RVC_LUI relocations
The code previously specified a 32-bit range for R_RISCV_HI20 and R_RISCV_LO12_[IS], however this is incorrect as the maximum offset on RV64 that can be formed from the immediate of lui and the displacement of an I-type or S-type instruction is -0x80000800 to 0x7ffff7ff. There is also the same issue with a c.lui and LO12 pair, whose actual addressable range should be -0x20800 to 0x1f7ff. The tests will be included in the next patch that converts all RISC-V tests to use llvm-mc instead of yaml2obj, as assembler support has matured enough to write tests in them. Differential Revision: https://reviews.llvm.org/D60414 llvm-svn: 357995
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions