[llvm] 3100021 - [JITLink][RISCV] Fix incorrectly use of uint32_t
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 1 21:50:51 PST 2023
Author: luxufan
Date: 2023-01-02T13:48:39+08:00
New Revision: 31000211e0113ae76594ca2c0ac1c225bd461a73
URL: https://github.com/llvm/llvm-project/commit/31000211e0113ae76594ca2c0ac1c225bd461a73
DIFF: https://github.com/llvm/llvm-project/commit/31000211e0113ae76594ca2c0ac1c225bd461a73.diff
LOG: [JITLink][RISCV] Fix incorrectly use of uint32_t
Added:
Modified:
llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
index 91f0fe0f0abeb..184b97b1741cf 100644
--- a/llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
@@ -338,7 +338,7 @@ class ELFJITLinker_riscv : public JITLinker<ELFJITLinker_riscv> {
FixupAddress.getValue())) +
E.getAddend())
.getValue();
- *(little16_t *)FixupPtr = static_cast<uint32_t>(Value);
+ *(little16_t *)FixupPtr = static_cast<uint16_t>(Value);
break;
}
case R_RISCV_ADD8: {
More information about the llvm-commits
mailing list