x86: Remove use of .cfi_escape

The unwind info isn't 100% correct at all points during the epilogue,
and not annotating is just as incorrect as the annotation.  This works
better on systems that do not support DW_OP_call_frame_cfa.
This commit is contained in:
Richard Henderson
2015-01-05 10:01:37 -08:00
parent 1b12593d7e
commit ed1ca2777c
+5 -10
View File
@@ -405,16 +405,11 @@ C(ffi_closure_STDCALL):
movl closure_FS(%esp), %edx /* move return address */ movl closure_FS(%esp), %edx /* move return address */
movl %edx, (%ecx) movl %edx, (%ecx)
/* New pseudo-stack frame based off ecx. This is unwind trickery /* From this point on, the value of %esp upon return is %ecx+4,
in that the CFA *has* changed, to the proper popped stack address. and we've copied the return address to %ecx to make return easy.
Note that the location to which we moved the return address There's no point in representing this in the unwind info, as
is the new CFA-4, so that's unchanged. */ there is always a window between the mov and the ret which
cfi_def_cfa(%ecx, 4) will be wrong from one point of view or another. */
/* Normally esp is unwound to CFA + the caller's ARGS_SIZE.
We've just set the CFA to that final value. Tell the unwinder
to restore esp from CFA without the ARGS_SIZE:
DW_CFA_val_expression %esp, DW_OP_call_frame_cfa. */
cfi_escape(0x16, 4, 1, 0x9c)
FFI_CLOSURE_MASK_AND_JUMP FFI_CLOSURE_MASK_AND_JUMP