[all-commits] [llvm/llvm-project] 6a14a5: [JITLink][RISCV] ADD/SUB relocs: read value from w...
Job Noorman via All-commits
all-commits at lists.llvm.org
Fri Apr 7 00:48:41 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6a14a56aaf77c615f9e4ab77b35029b0e6c8909f
https://github.com/llvm/llvm-project/commit/6a14a56aaf77c615f9e4ab77b35029b0e6c8909f
Author: Job Noorman <jnoorman at igalia.com>
Date: 2023-04-07 (Fri, 07 Apr 2023)
Changed paths:
M llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
M llvm/test/ExecutionEngine/JITLink/RISCV/riscv_reloc_add.s
Log Message:
-----------
[JITLink][RISCV] ADD/SUB relocs: read value from working memory
The various ADD/SUB relocations work by reading the current value the
relocation points to, transforming it, and then writing it back to
memory. While the current implementation writes the value back to
working memory, it reads the current value from the execution address of
the relocation. This causes at least wrong results, but often crashes,
when the addresses of working memory are not equal to execution
addresses. This patch fixes this by reading the current value from
working memory.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D147693
More information about the All-commits
mailing list