elliottt opened PR #5440 from trevor/assert-virtual-regs-move
to main
:
<!--
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.
elliottt updated PR #5440 from trevor/assert-virtual-regs-move
to main
.
elliottt updated PR #5440 from trevor/assert-virtual-regs-move
to main
.
elliottt requested cfallin for a review on PR #5440.
elliottt updated PR #5440 from trevor/assert-virtual-regs-move
to main
.
elliottt updated PR #5440 from trevor/assert-virtual-regs-move
to main
.
elliottt has marked PR #5440 as ready for review.
elliottt edited PR #5440 from trevor/assert-virtual-regs-move
to main
:
Assert that we never see real registers as arguments to move instructions in
VCodeBuilder::collect_operands
.Also fix a bug in the riscv64 backend that was discovered by these assertions: the lowerings of
get_stack_pointer
andget_frame_pointer
were using physical registers 8 and 2 directly. The solution was similar to other backends: add a move instruction specifically for moving out of physical registers, whose source operand is opaque to regalloc2.
<!--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 submitted PR review.
cfallin created PR review comment:
Can we add a note here that the
PReg
must be a non-allocatable register?
cfallin created PR review comment:
This generic constructor seems a little dangerous because it allows construction of
PReg
values for allocatable registers, which should not be usable; these will ideally be caught by an assertion (e.g. when handling moves) but it would be better to avoid constructing them in the first place. Could we expose specific constructors for the registers we want (e.g.,fp_reg
,sp_reg
) here instead?
cfallin created PR review comment:
Inadvertent insertion/repetition?
cfallin created PR review comment:
Is
fmv.d
the right mnemonic here? That's a floating-point move, no?
elliottt created PR review comment:
Yep, thanks!
elliottt submitted PR review.
elliottt submitted PR review.
elliottt created PR review comment:
Good catch, I misread the F64 in the above case for Mov.
elliottt updated PR #5440 from trevor/assert-virtual-regs-move
to main
.
elliottt merged PR #5440.
Last updated: Dec 23 2024 at 12:05 UTC