projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad3e0e4
)
[JITLink][RISCV] Improve R_RISCV_JAL
author
Jonas Hahnfeld
<hahnjo@hahnjo.de>
Sun, 1 Jan 2023 18:07:32 +0000
(19:07 +0100)
committer
Jonas Hahnfeld
<hahnjo@hahnjo.de>
Tue, 3 Jan 2023 16:18:39 +0000
(17:18 +0100)
Only take the lower 12 bits of RawInstr.
Differential Revision: https://reviews.llvm.org/D140820
llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
b/llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
index
f60953f
..
3fcc45e
100644
(file)
--- a/
llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
+++ b/
llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
@@
-224,7
+224,8
@@
private:
uint32_t Imm11 = extractBits(Value, 11, 1) << 20;
uint32_t Imm19_12 = extractBits(Value, 12, 8) << 12;
uint32_t RawInstr = *(little32_t *)FixupPtr;
- *(little32_t *)FixupPtr = RawInstr | Imm20 | Imm10_1 | Imm11 | Imm19_12;
+ *(little32_t *)FixupPtr =
+ (RawInstr & 0xFFF) | Imm20 | Imm10_1 | Imm11 | Imm19_12;
break;
}
case R_RISCV_CALL: {