mirror of
https://github.com/corda/corda.git
synced 2025-06-19 07:38:22 +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:
@ -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);
|
||||
|
Reference in New Issue
Block a user