[all-commits] [llvm/llvm-project] d6d0b6: unwind: repair register restoration for OR1K
Saleem Abdulrasool via All-commits
all-commits at lists.llvm.org
Mon Aug 2 09:40:57 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d6d0b6559e97a3d0b258814e870d3e19f3a7ffcc
https://github.com/llvm/llvm-project/commit/d6d0b6559e97a3d0b258814e870d3e19f3a7ffcc
Author: Saleem Abdulrasool <compnerd at compnerd.org>
Date: 2021-08-02 (Mon, 02 Aug 2021)
Changed paths:
M libunwind/src/UnwindRegistersRestore.S
Log Message:
-----------
unwind: repair register restoration for OR1K
Currently, OR1K architecture put the program counter at offset 0x128 of
the current `or1k_thread_state_t`. However, the PC is restored after
updating the thread pointer in `r3`, which causes the PC to be fetched
incorrectly.
This patch swaps the order of restoration of `r9` and `r3`, such that
the PC is restored to `r9` using the current thread state.
Patch by Oi Chee Cheung!
Reviewed By: whitequark, compnerd
Differential Revision: https://reviews.llvm.org/D107042
More information about the All-commits
mailing list