Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: src/crankshaft/x64/lithium-gap-resolver-x64.cc

Issue 2023763010: [x64] Make xmm0 allocatable and use xmm15 as scratch register instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/crankshaft/x64/lithium-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x64/lithium-gap-resolver-x64.cc
diff --git a/src/crankshaft/x64/lithium-gap-resolver-x64.cc b/src/crankshaft/x64/lithium-gap-resolver-x64.cc
index 3808c377dc1f17b172549817d5240f1a14679216..94dffb333ac3961c17b5dc5497db7cf81fc5431e 100644
--- a/src/crankshaft/x64/lithium-gap-resolver-x64.cc
+++ b/src/crankshaft/x64/lithium-gap-resolver-x64.cc
@@ -223,8 +223,8 @@ void LGapResolver::EmitMove(int index) {
__ Movsd(cgen_->ToDoubleRegister(destination), src);
} else {
DCHECK(destination->IsDoubleStackSlot());
- __ Movsd(xmm0, src);
- __ Movsd(cgen_->ToOperand(destination), xmm0);
+ __ Movsd(kScratchDoubleReg, src);
+ __ Movsd(cgen_->ToOperand(destination), kScratchDoubleReg);
}
} else {
UNREACHABLE();
@@ -264,18 +264,18 @@ void LGapResolver::EmitSwap(int index) {
// Swap two stack slots or two double stack slots.
Operand src = cgen_->ToOperand(source);
Operand dst = cgen_->ToOperand(destination);
- __ Movsd(xmm0, src);
+ __ Movsd(kScratchDoubleReg, src);
__ movp(kScratchRegister, dst);
- __ Movsd(dst, xmm0);
+ __ Movsd(dst, kScratchDoubleReg);
__ movp(src, kScratchRegister);
} else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) {
// Swap two double registers.
XMMRegister source_reg = cgen_->ToDoubleRegister(source);
XMMRegister destination_reg = cgen_->ToDoubleRegister(destination);
- __ Movapd(xmm0, source_reg);
+ __ Movapd(kScratchDoubleReg, source_reg);
__ Movapd(source_reg, destination_reg);
- __ Movapd(destination_reg, xmm0);
+ __ Movapd(destination_reg, kScratchDoubleReg);
} else if (source->IsDoubleRegister() || destination->IsDoubleRegister()) {
// Swap a double register and a double stack slot.
@@ -287,9 +287,9 @@ void LGapResolver::EmitSwap(int index) {
LOperand* other = source->IsDoubleRegister() ? destination : source;
DCHECK(other->IsDoubleStackSlot());
Operand other_operand = cgen_->ToOperand(other);
- __ Movapd(xmm0, reg);
+ __ Movapd(kScratchDoubleReg, reg);
__ Movsd(reg, other_operand);
- __ Movsd(other_operand, xmm0);
+ __ Movsd(other_operand, kScratchDoubleReg);
} else {
// No other combinations are possible.
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/crankshaft/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698