cfallin opened PR #4247 from backport-4239-release-0.38
to release-0.38.0
:
This is a cherry-pick of "x64 backend: fix
to_amode
with constant address (no registers). (#4239)"If an address expression is given to
to_amode
that is completely
constant (no registers at all), then it will produce anAmode
that has
the resulting constant as an offset, and(invalid_reg)
as the base.
This is a side-effect of the way we build up the amode step-by-step --
we're waiting to see a register and plug it into the base field. If we
never get a reg though, we need to generate a constant zero into a
register and use that as the base. This PR adds afinalize_amode
helper to do just that.<!--
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 requested alexcrichton for a review on PR #4247.
alexcrichton submitted PR review.
cfallin merged PR #4247.
Last updated: Dec 23 2024 at 13:07 UTC