marxin opened PR #15343 from marxin:macho-tail-cc-v2 to bytecodealliance:main:
Both calling conventions use the same callee-saved registers, so both can be represented in the Mach-O compact unwind format.
marxin removed the review request for wasmtime-compiler-reviewers from PR #15343.
marxin requested alexcrichton for a review on PR #15343.
marxin requested wasmtime-compiler-reviewers for a review on PR #15343.
github-actions[bot] added the label cranelift on PR #15343.
github-actions[bot] added the label cranelift:area:aarch64 on PR #15343.
:memo: alexcrichton submitted PR review:
Could you explain the rationale a bit more for this? This looks like it's pessimizing the tail ABI slightly by considering more registers clobbered, and we generally consider the tail ABI the fastest one or use in wasm, so wouldn't this pessimize performance?
marxin commented on PR #15343:
Sure - the motivation is that we would like to support
return_callandreturn_call_indirectopcode. And, onlyTailCallsupports this opcodes, we need to switch to. We are fine with a small bigger prologue/epilogue connected to the compact unwind restrictions where callee-save register pushes and pops need to happen always in pairs. Note, theenable_compact_unwind_abiis an opt-in option.
marxin edited a comment on PR #15343:
Sure - the motivation is that we would like to support
return_callandreturn_call_indirectopcodes. And, as onlyTailCallsupports this opcodes, we need to switch to. We are fine with a small bigger prologue/epilogue connected to the compact unwind restrictions where callee-save register pushes and pops need to happen always in pairs. Note, theenable_compact_unwind_abiis an opt-in option.
marxin edited a comment on PR #15343:
Sure - the motivation is that we would like to support
return_callandreturn_call_indirectopcodes. And, as onlyTailCallsupports this opcodes, we need to switch to it. We are fine with a small bigger prologue/epilogue connected to the compact unwind restrictions where callee-save register pushes and pops need to happen always in pairs. Note, theenable_compact_unwind_abiis an opt-in option.
alexcrichton commented on PR #15343:
Sure yeah that part of the motivation is already eminently clear, I mean moreso combining compact unwind info and the
tailABI. Are you sure that the compact unwind information can describe thetailconvention in its full implementation as well? For example thetailconvention may allocate stack space before clobbers are pushed onto the stack, which I'd be surprised if compact unwind info handled.Additionally, there are no tests in this PR, and that'll need to be added to be considered to land.
Last updated: Nov 19 2026 at 20:05 UTC