Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JITLink] Fix the incorrect relocation behavior for R_RISCV_BRANCH
In D116573, the relocation behavior of R_RISCV_BRANCH didn't consider that branch instruction like 'bge' has a branch target address which is given as a PC-relative offset, sign-extend and multiplied by 2. Although the target address is a 12-bits number, acctually its range is [-4096, 4094]. This patch fix it. Differential Revision: https://reviews.llvm.org/D118151
- Loading branch information
luxufan
authored and
luxufan
committed
Feb 7, 2022
1 parent
3a3cb92
commit 9920943
Showing
3 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters