Open
Description
In #10421, I noticed that we do not emit unwind info for function epilogues:
Here is the Wasm function
f(x) = x + 1
compiled by Wasmtime and Cranelift:0000000000000000 <wasm[0]::function[0]>: 0: 55 pushq %rbp 1: 48 89 e5 movq %rsp, %rbp 4: 8d 42 01 leal 0x1(%rdx), %eax 7: 48 89 ec movq %rbp, %rsp a: 5d popq %rbp b: c3 retqHere is the FDE that covers that function (lightly edited output of dwarfdump --eh-frame):
FDE cie=00000000 pc=fffffffffffff000...fffffffffffff00c Format: DWARF32 DW_CFA_advance_loc: 1 DW_CFA_def_cfa_offset: +16 DW_CFA_offset: RBP -16 DW_CFA_advance_loc: 3 DW_CFA_def_cfa_register: RBP 0xfffffffffffff000: CFA=RSP+8: RIP=[CFA-8] 0xfffffffffffff001: CFA=RSP+16: RBP=[CFA-16], RIP=[CFA-8] 0xfffffffffffff004: CFA=RBP+16: RBP=[CFA-16], RIP=[CFA-8]...
(Aside 1: we don't properly encode the CFA for the epilogue, but probably should for completeness. Will file a separate issue about this.)