mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
fix PowerPC tails=true stack undwinding
This commit is contained in:
parent
8f519531d4
commit
30feba8b56
@ -1939,11 +1939,11 @@ nextFrame(ArchitectureContext* c UNUSED, int32_t* start, unsigned size,
|
||||
// check for post-non-tail-call stack adjustment of the form "lwzx
|
||||
// r0,0(r1); stwu r0,offset(r1)":
|
||||
if (instruction < start + (size / BytesPerWord) - 1
|
||||
and (static_cast<uint32_t>(instruction[1]) >> 16) == 0x9421)
|
||||
and (static_cast<uint32_t>(instruction[1]) >> 16) == 0x9401)
|
||||
{
|
||||
offset += static_cast<int16_t>(instruction[1]);
|
||||
} else if ((static_cast<uint32_t>(*instruction) >> 16) == 0x9421) {
|
||||
offset += static_cast<int16_t>(*instruction);
|
||||
offset += static_cast<int16_t>(instruction[1]) / BytesPerWord;
|
||||
} else if ((static_cast<uint32_t>(*instruction) >> 16) == 0x9401) {
|
||||
offset += static_cast<int16_t>(*instruction) / BytesPerWord;
|
||||
}
|
||||
|
||||
// todo: check for and handle tail calls
|
||||
|
Loading…
Reference in New Issue
Block a user