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

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

Issue 644993002: X64: replace explicit zero-extend with runtime assert (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« 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/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 case kSSECvtsd2ss: 410 case kSSECvtsd2ss:
411 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 411 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
412 break; 412 break;
413 case kSSEFloat64ToInt32: 413 case kSSEFloat64ToInt32:
414 if (instr->InputAt(0)->IsDoubleRegister()) { 414 if (instr->InputAt(0)->IsDoubleRegister()) {
415 __ cvttsd2si(i.OutputRegister(), i.InputDoubleRegister(0)); 415 __ cvttsd2si(i.OutputRegister(), i.InputDoubleRegister(0));
416 } else { 416 } else {
417 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); 417 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0));
418 } 418 }
419 break; 419 break;
420 case kSSEFloat64ToUint32: 420 case kSSEFloat64ToUint32: {
421 if (instr->InputAt(0)->IsDoubleRegister()) { 421 if (instr->InputAt(0)->IsDoubleRegister()) {
422 __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); 422 __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0));
423 } else { 423 } else {
424 __ cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); 424 __ cvttsd2siq(i.OutputRegister(), i.InputOperand(0));
425 } 425 }
426 __ andl(i.OutputRegister(), i.OutputRegister()); // clear upper bits. 426 __ AssertZeroExtended(i.OutputRegister());
427 // TODO(turbofan): generated code should not look at the upper 32 bits
428 // of the result, but those bits could escape to the outside world.
429 break; 427 break;
428 }
430 case kSSEInt32ToFloat64: 429 case kSSEInt32ToFloat64:
431 if (instr->InputAt(0)->IsRegister()) { 430 if (instr->InputAt(0)->IsRegister()) {
432 __ cvtlsi2sd(i.OutputDoubleRegister(), i.InputRegister(0)); 431 __ cvtlsi2sd(i.OutputDoubleRegister(), i.InputRegister(0));
433 } else { 432 } else {
434 __ cvtlsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); 433 __ cvtlsi2sd(i.OutputDoubleRegister(), i.InputOperand(0));
435 } 434 }
436 break; 435 break;
437 case kSSEUint32ToFloat64: 436 case kSSEUint32ToFloat64:
438 if (instr->InputAt(0)->IsRegister()) { 437 if (instr->InputAt(0)->IsRegister()) {
439 __ cvtqsi2sd(i.OutputDoubleRegister(), i.InputRegister(0)); 438 __ cvtqsi2sd(i.OutputDoubleRegister(), i.InputRegister(0));
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 } 988 }
990 } 989 }
991 MarkLazyDeoptSite(); 990 MarkLazyDeoptSite();
992 } 991 }
993 992
994 #undef __ 993 #undef __
995 994
996 } // namespace internal 995 } // namespace internal
997 } // namespace compiler 996 } // namespace compiler
998 } // namespace v8 997 } // 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