Commit 96f7ea25 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[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: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80203}
parent d69ac35e
...@@ -606,18 +606,31 @@ void GapMove::AllocateVreg(MaglevVregAllocationState* vreg_state, ...@@ -606,18 +606,31 @@ void GapMove::AllocateVreg(MaglevVregAllocationState* vreg_state,
} }
void GapMove::GenerateCode(MaglevCodeGenState* code_gen_state, void GapMove::GenerateCode(MaglevCodeGenState* code_gen_state,
const ProcessingState& state) { const ProcessingState& state) {
if (source().IsAnyRegister()) { if (source().IsRegister()) {
Register source_reg = ToRegister(source()); Register source_reg = ToRegister(source());
if (target().IsAnyRegister()) { if (target().IsAnyRegister()) {
DCHECK(target().IsRegister());
__ movq(ToRegister(target()), source_reg); __ movq(ToRegister(target()), source_reg);
} else { } else {
__ movq(code_gen_state->ToMemOperand(target()), source_reg); __ movq(code_gen_state->ToMemOperand(target()), source_reg);
} }
} else if (source().IsDoubleRegister()) {
DoubleRegister source_reg = ToDoubleRegister(source());
if (target().IsAnyRegister()) {
DCHECK(target().IsDoubleRegister());
__ Movsd(ToDoubleRegister(target()), source_reg);
} else {
__ Movsd(code_gen_state->ToMemOperand(target()), source_reg);
}
} else { } else {
DCHECK(source().IsAnyStackSlot());
MemOperand source_op = code_gen_state->ToMemOperand(source()); MemOperand source_op = code_gen_state->ToMemOperand(source());
if (target().IsAnyRegister()) { if (target().IsRegister()) {
__ movq(ToRegister(target()), source_op); __ movq(ToRegister(target()), source_op);
} else if (target().IsDoubleRegister()) {
__ Movsd(ToDoubleRegister(target()), source_op);
} else { } else {
DCHECK(target().IsAnyStackSlot());
__ movq(kScratchRegister, source_op); __ movq(kScratchRegister, source_op);
__ movq(code_gen_state->ToMemOperand(target()), kScratchRegister); __ movq(code_gen_state->ToMemOperand(target()), kScratchRegister);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment