Okay, while `.cfi_same_value` in the clean-up part technically worked for the tested unwinders, it was actually still wrong to use. The content of the register can be computed by looking at the register itself and not at the value previously computed by the previous frame (which does not exist at that point in time as we are in leaf-code).
I'm not completely sure to follow you here. Doesn't `.cfi_same_value x` mean "at this point the value of the register is the same as the returning frame, and doesn't need restoration (ie: it has been restored already)". Isn't that, in effect, the exact same thing as `.cfi_register x, x`, even though it's encoded differently?
Regarding the XMM registers. I added the instructions, to be the register content during the execution of the function and being the "same value" as the previous computation (i.e. the callee, i.e. the syscall) during the call.
I was mostly asking out of curiosity, maybe it's not worth adding them. Now, the `.cfi_register xmmX, xmmX` at the top of the procedure seem a bit weird to me. Isn't that the default already, do we need to make it explicit?