uweigand opened PR #5092 from s390x-call-abi
to main
:
Use the regalloc constraint-based CallArgList / CallRetList mechanism instead of directly using physregs in instructions.
CC @cfallin @elliottt
Note that this patch continues to emit calls directly from ISLE. I tried to use the common
gen_call
, but that would require several extensions to properly support s390x:
- We need to use
accumulate_outgoing_args_size
instead ofemit_stack_pre_adjust
/emit_stack_post_adjust
.ImplicitPtrArg
and the register version ofStructArg
are only implemented in ISLE right now.- We need to lane-swap vector registers in case of a caller/callee ABI mismatch.
Except for that last point, I have some implementation prototypes. But even so, the resulting code was of lower quality than what I get with the ISLE-based logic today - in particular, with the ISLE logic we can better fold incoming argument expressions (e.g. into sign extension, or into the address used for a memory copy instruction). Therefore I decided to stay with this approach.
The generated code remains the same except for register allocation and instruction scheduling differences.
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
cfallin submitted PR review.
cfallin merged PR #5092.
Last updated: Dec 23 2024 at 12:05 UTC