Skip to content
Commit 9920943e authored by luxufan's avatar luxufan Committed by luxufan
Browse files

[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
parent 3a3cb929
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment