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

Unified Diff: src/compiler/x64/code-generator-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 | « no previous file | src/crankshaft/x64/lithium-codegen-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index a4ece5d557ac0a21887a363a5d63c942c615a331..0e239bae1194253b66c536001efeca2640ead089 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -18,10 +18,6 @@ namespace compiler {
#define __ masm()->
-
-#define kScratchDoubleReg xmm0
-
-
// Adds X64 specific methods for decoding operands.
class X64OperandConverter : public InstructionOperandConverter {
public:
@@ -2227,10 +2223,9 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
XMMRegister dst = g.ToDoubleRegister(destination);
__ Movsd(dst, src);
} else {
- // We rely on having xmm0 available as a fixed scratch register.
Operand dst = g.ToOperand(destination);
- __ Movsd(xmm0, src);
- __ Movsd(dst, xmm0);
+ __ Movsd(kScratchDoubleReg, src);
+ __ Movsd(dst, kScratchDoubleReg);
}
} else {
UNREACHABLE();
@@ -2274,21 +2269,19 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
dst = g.ToOperand(destination);
__ popq(dst);
} else if (source->IsFPRegister() && destination->IsFPRegister()) {
- // XMM register-register swap. We rely on having xmm0
- // available as a fixed scratch register.
+ // XMM register-register swap.
XMMRegister src = g.ToDoubleRegister(source);
XMMRegister dst = g.ToDoubleRegister(destination);
- __ Movapd(xmm0, src);
+ __ Movapd(kScratchDoubleReg, src);
__ Movapd(src, dst);
- __ Movapd(dst, xmm0);
+ __ Movapd(dst, kScratchDoubleReg);
} else if (source->IsFPRegister() && destination->IsFPStackSlot()) {
- // XMM register-memory swap. We rely on having xmm0
- // available as a fixed scratch register.
+ // XMM register-memory swap.
XMMRegister src = g.ToDoubleRegister(source);
Operand dst = g.ToOperand(destination);
- __ Movsd(xmm0, src);
+ __ Movsd(kScratchDoubleReg, src);
__ Movsd(src, dst);
- __ Movsd(dst, xmm0);
+ __ Movsd(dst, kScratchDoubleReg);
} else {
// No other combinations are possible.
UNREACHABLE();
« no previous file with comments | « no previous file | src/crankshaft/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698