Open stephenrkell opened 3 years ago
This code has been overhauled in 7e070fb9353023b0701cd72cabffe417fad77391, and now has more chance of working, but is not yet tested.
Following further fixes, this now passes a basic test as of 2ed8ffd5 -- still needs testing on 64-bit and in greater depth generally.
This is now tested a bit more and some issues fixed as of 0b7ff5b5. It seems to work on 64-bit. Still not well-tested.
This is a known problem. I have seen this work successfully, but it is not reliable because the compiler doesn't know what we're doing. Once the stack is zapped, any locals not held in registers will be lost, and the compiler doesn't let us tell it to refrain from using the stack.
Although "rewrite in assembly" has been my tentative solution, it may be possible to clean up the code and retain a C-like solution by aggressive use of
__asm__("rdx")
and similar annotations on locals.