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

Side by Side Diff: src/compiler/x64/code-generator-x64.cc

Issue 972053002: [x64] Use movaps instead of movsd for the move between double registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 } else { 1346 } else {
1347 DCHECK(destination->IsDoubleStackSlot()); 1347 DCHECK(destination->IsDoubleStackSlot());
1348 __ movq(kScratchRegister, src_const); 1348 __ movq(kScratchRegister, src_const);
1349 __ movq(g.ToOperand(destination), kScratchRegister); 1349 __ movq(g.ToOperand(destination), kScratchRegister);
1350 } 1350 }
1351 } 1351 }
1352 } else if (source->IsDoubleRegister()) { 1352 } else if (source->IsDoubleRegister()) {
1353 XMMRegister src = g.ToDoubleRegister(source); 1353 XMMRegister src = g.ToDoubleRegister(source);
1354 if (destination->IsDoubleRegister()) { 1354 if (destination->IsDoubleRegister()) {
1355 XMMRegister dst = g.ToDoubleRegister(destination); 1355 XMMRegister dst = g.ToDoubleRegister(destination);
1356 __ movsd(dst, src); 1356 __ movaps(dst, src);
1357 } else { 1357 } else {
1358 DCHECK(destination->IsDoubleStackSlot()); 1358 DCHECK(destination->IsDoubleStackSlot());
1359 Operand dst = g.ToOperand(destination); 1359 Operand dst = g.ToOperand(destination);
1360 __ movsd(dst, src); 1360 __ movsd(dst, src);
1361 } 1361 }
1362 } else if (source->IsDoubleStackSlot()) { 1362 } else if (source->IsDoubleStackSlot()) {
1363 DCHECK(destination->IsDoubleRegister() || destination->IsDoubleStackSlot()); 1363 DCHECK(destination->IsDoubleRegister() || destination->IsDoubleStackSlot());
1364 Operand src = g.ToOperand(source); 1364 Operand src = g.ToOperand(source);
1365 if (destination->IsDoubleRegister()) { 1365 if (destination->IsDoubleRegister()) {
1366 XMMRegister dst = g.ToDoubleRegister(destination); 1366 XMMRegister dst = g.ToDoubleRegister(destination);
(...skipping 30 matching lines...) Expand all
1397 Operand src = g.ToOperand(source); 1397 Operand src = g.ToOperand(source);
1398 Operand dst = g.ToOperand(destination); 1398 Operand dst = g.ToOperand(destination);
1399 __ movq(tmp, dst); 1399 __ movq(tmp, dst);
1400 __ xchgq(tmp, src); 1400 __ xchgq(tmp, src);
1401 __ movq(dst, tmp); 1401 __ movq(dst, tmp);
1402 } else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) { 1402 } else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) {
1403 // XMM register-register swap. We rely on having xmm0 1403 // XMM register-register swap. We rely on having xmm0
1404 // available as a fixed scratch register. 1404 // available as a fixed scratch register.
1405 XMMRegister src = g.ToDoubleRegister(source); 1405 XMMRegister src = g.ToDoubleRegister(source);
1406 XMMRegister dst = g.ToDoubleRegister(destination); 1406 XMMRegister dst = g.ToDoubleRegister(destination);
1407 __ movsd(xmm0, src); 1407 __ movaps(xmm0, src);
1408 __ movsd(src, dst); 1408 __ movaps(src, dst);
1409 __ movsd(dst, xmm0); 1409 __ movaps(dst, xmm0);
1410 } else if (source->IsDoubleRegister() && destination->IsDoubleStackSlot()) { 1410 } else if (source->IsDoubleRegister() && destination->IsDoubleStackSlot()) {
1411 // XMM register-memory swap. We rely on having xmm0 1411 // XMM register-memory swap. We rely on having xmm0
1412 // available as a fixed scratch register. 1412 // available as a fixed scratch register.
1413 XMMRegister src = g.ToDoubleRegister(source); 1413 XMMRegister src = g.ToDoubleRegister(source);
1414 Operand dst = g.ToOperand(destination); 1414 Operand dst = g.ToOperand(destination);
1415 __ movsd(xmm0, src); 1415 __ movsd(xmm0, src);
1416 __ movsd(src, dst); 1416 __ movsd(src, dst);
1417 __ movsd(dst, xmm0); 1417 __ movsd(dst, xmm0);
1418 } else { 1418 } else {
1419 // No other combinations are possible. 1419 // No other combinations are possible.
(...skipping 24 matching lines...) Expand all
1444 } 1444 }
1445 } 1445 }
1446 MarkLazyDeoptSite(); 1446 MarkLazyDeoptSite();
1447 } 1447 }
1448 1448
1449 #undef __ 1449 #undef __
1450 1450
1451 } // namespace internal 1451 } // namespace internal
1452 } // namespace compiler 1452 } // namespace compiler
1453 } // namespace v8 1453 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698