Stream: git-wasmtime

Topic: wasmtime / PR #2548 aarch64: fix reg/imm `sub` insts that...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 05 2021 at 23:58):

cfallin requested fitzgen for a review on PR #2548.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 05 2021 at 23:58):

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 index 31 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 the iconst
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.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2021 at 00:18):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2021 at 00:38):

fitzgen merged PR #2548.


Last updated: Dec 23 2024 at 13:07 UTC