[maglev] Support GapMove with double registers
Bug: v8:7700 Change-Id: I766b523cfaf30eda9c33d9f2c580bc72a2eaa9ca Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605815 Auto-Submit: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#80203}
This commit is contained in:
parent
d69ac35e4b
commit
96f7ea2541
@ -606,18 +606,31 @@ void GapMove::AllocateVreg(MaglevVregAllocationState* vreg_state,
|
||||
}
|
||||
void GapMove::GenerateCode(MaglevCodeGenState* code_gen_state,
|
||||
const ProcessingState& state) {
|
||||
if (source().IsAnyRegister()) {
|
||||
if (source().IsRegister()) {
|
||||
Register source_reg = ToRegister(source());
|
||||
if (target().IsAnyRegister()) {
|
||||
DCHECK(target().IsRegister());
|
||||
__ movq(ToRegister(target()), source_reg);
|
||||
} else {
|
||||
__ movq(code_gen_state->ToMemOperand(target()), source_reg);
|
||||
}
|
||||
} else {
|
||||
MemOperand source_op = code_gen_state->ToMemOperand(source());
|
||||
} else if (source().IsDoubleRegister()) {
|
||||
DoubleRegister source_reg = ToDoubleRegister(source());
|
||||
if (target().IsAnyRegister()) {
|
||||
__ movq(ToRegister(target()), source_op);
|
||||
DCHECK(target().IsDoubleRegister());
|
||||
__ Movsd(ToDoubleRegister(target()), source_reg);
|
||||
} else {
|
||||
__ Movsd(code_gen_state->ToMemOperand(target()), source_reg);
|
||||
}
|
||||
} else {
|
||||
DCHECK(source().IsAnyStackSlot());
|
||||
MemOperand source_op = code_gen_state->ToMemOperand(source());
|
||||
if (target().IsRegister()) {
|
||||
__ movq(ToRegister(target()), source_op);
|
||||
} else if (target().IsDoubleRegister()) {
|
||||
__ Movsd(ToDoubleRegister(target()), source_op);
|
||||
} else {
|
||||
DCHECK(target().IsAnyStackSlot());
|
||||
__ movq(kScratchRegister, source_op);
|
||||
__ movq(code_gen_state->ToMemOperand(target()), kScratchRegister);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user