Closed abukharmeh closed 1 year ago
The current CFI info is correct. The mentioned problem is the order of CFI, or the order of saving/restoring is different from the example in spec.
I don't think we need to make any change unless the spec has a regulation for the order of saving.
So you think the offsets are correct ? (I.e I dont think there is restriction on what order the stores are, but their location in memory) If so we can close this issue.
Better double-check it. But the implementation of the push/pop order also follows the implementation of msave-restore, and that is why they have the same CFI order.
This is actually a GCC problem see GCC issue #20
Closing issue, now it is filed with GCC
It looks like we used CFI information from msave restore to implement push/pop, while they are reversed ? This could potentially mean that the debugger wont work when we have exception and we try to unwind stack frame ref : https://github.com/riscv/riscv-code-size-reduction/issues/182