Stream: git-wasmtime

Topic: wasmtime / issue #5116 s390x: Fix handling of sret arguments


view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2022 at 10:04):

bjorn3 commented on issue #5116:

OTOH does any code ever actually have a StructReturn on the return list that isn't added by missing_struct_return

Not that I know of. cg_clif at least only uses StructReturn as argument.

The fact that the incoming return-buffer address needs to be preserved in a return register is a property of the Intel ABI only

AArch64 uses a specific register for this argument which is callee saved.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2022 at 10:27):

uweigand commented on issue #5116:

The fact that the incoming return-buffer address needs to be preserved in a return register is a property of the Intel ABI only

AArch64 uses a specific register for this argument which is callee saved.

Hmm, I'm seeing this in the AAPCS64 (chapter 5.5 Result Return):

Otherwise, the caller shall reserve a block of memory of sufficient size and alignment to hold the result. The
address of the memory block shall be passed as an additional argument to the function in x8. The callee may
modify the result memory block at any point during the execution of the subroutine (**there is no requirement for
the callee to preserve the value stored in x8**).

Am I missing something here?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2022 at 11:17):

bjorn3 commented on issue #5116:

Didn't see that section. My bad.


Last updated: Oct 23 2024 at 20:03 UTC