mirror of
https://github.com/corda/corda.git
synced 2025-02-10 12:51:37 +00:00
save return address in arm.cpp's MyAssembler::saveFrame
This is necessary to allow safe stack unwinding (e.g. for exception handling and garbage collection) from native code.
This commit is contained in:
parent
a20d7e028b
commit
bd01784249
@ -1856,6 +1856,11 @@ class MyAssembler: public Assembler {
|
||||
}
|
||||
|
||||
virtual void saveFrame(unsigned stackOffset, unsigned) {
|
||||
Register returnAddress(LinkRegister);
|
||||
Memory returnAddressDst
|
||||
(StackRegister, arch_->returnAddressOffset() * BytesPerWord);
|
||||
moveRM(&c, BytesPerWord, &returnAddress, BytesPerWord, &returnAddressDst);
|
||||
|
||||
Register stack(StackRegister);
|
||||
Memory stackDst(ThreadRegister, stackOffset);
|
||||
moveRM(&c, BytesPerWord, &stack, BytesPerWord, &stackDst);
|
||||
|
Loading…
x
Reference in New Issue
Block a user