cfallin requested fitzgen for a review on PR #2548.
cfallin opened PR #2548 from fix-aarch64-sp
to main
:
On AArch64, the zero register (xzr) and the stack pointer (xsp) are
alternately named by the same index31
in machine code depending on
context. In particular, in the reg-reg-immediate ALU instruction form,
add/subtract will use the stack pointer, not the zero register, if index
31 is given for the first (register) source arg.In a few places, we were emitting subtract instructions with the zero
register as an argument and a reg/immediate as the second argument. When
an immediate could be incorporated directly (we have theiconst
definition visible), this would result in incorrect code being
generated.This issue was found in
ineg
and in the sequence for vector
right-shifts.Reported by Ian Cullinan; thanks!
<!--
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.
-->
fitzgen submitted PR Review.
fitzgen merged PR #2548.
Last updated: Dec 23 2024 at 13:07 UTC