AArch64: Migrate calls and returns to ISLE.#4788
Conversation
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:area:machinst", "cranelift:area:x64", "isle"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
elliottt
left a comment
There was a problem hiding this comment.
This all looks great to me! I just had a couple of non-blocking questions 👍
| (decl lower_return (Range ValueSlice) InstOutput) | ||
| (rule (lower_return (range_empty) _) (output_none)) | ||
| (rule (lower_return (range_unwrap head tail) args) | ||
| (let ((_ Unit (copy_to_regs (retval head) (value_slice_get args head)))) | ||
| (lower_return tail args))) |
There was a problem hiding this comment.
Not at all blocking, but I wonder what a better name for this would be now that it's shared between multiple backends.
There was a problem hiding this comment.
We can definitely think more about this -- it also felt a little strange to put it in prelude.isle to be honest; it seems more like we need a library of "common lowering helpers" that is separate from the language and ISLE-binding prelude proper. But, we can refine more in subsequent PRs!
|
|
||
| ; block0: | ||
| ; orr x0, xzr, #4294967295 | ||
| ; movn x0, #0 |
There was a problem hiding this comment.
The returns are going through a different path now, so the immediate handling is a little different; but this is still correct I think (movn x0, #0 generates all-ones, which for an i32 func is the same as u32::MAX in the return register).
This borrows some machinery from x64 and makes it common. The order of setup for on-stack args is reversed now, but that seems OK if it means we can share more code!