summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2023-04-24 21:03:21 +0000
committerPaul Kirth <paulkirth@google.com>2023-04-26 15:58:09 +0000
commitbface3947ea15b45c78aff4792355651f72626a1 (patch)
treec2cbb85e476dfe178958785159703f8abe86287a /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentd311cb64a7d339c8d2be5351edaebd9bc21ebfe6 (diff)
[RISCV] Make SCS prologue interrupt safe on RISC-V
Prior to this patch the SCS prologue used the following instruction sequence. ``` s[w|d] ra, 0(gp) addi gp, gp, [4|8] ``` The problem with this sequence is that an interrupt occurring between the store and the increment could clobber the value just written to the SCS. https://reviews.llvm.org/D84414#inline-813203 pointed out a similar issues that could have affected the epilogue. This patch changes the instruction sequence in the prologue to: ``` addi gp, gp, [4|8] s[w|d] ra, -[4|8](gp) ``` The downside to this is that there is now a data dependency between the add and the store. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D149099
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions