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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.cc

Issue 431473004: TF: Add ConvertFloat64ToUint32 and ConvertUint32ToFloat64 machine operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « src/compiler/ia32/instruction-codes-ia32.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties-inl.h" 7 #include "src/compiler/node-properties-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 319 }
320 320
321 321
322 void InstructionSelector::VisitConvertInt32ToFloat64(Node* node) { 322 void InstructionSelector::VisitConvertInt32ToFloat64(Node* node) {
323 IA32OperandGenerator g(this); 323 IA32OperandGenerator g(this);
324 Emit(kSSEInt32ToFloat64, g.DefineAsDoubleRegister(node), 324 Emit(kSSEInt32ToFloat64, g.DefineAsDoubleRegister(node),
325 g.Use(node->InputAt(0))); 325 g.Use(node->InputAt(0)));
326 } 326 }
327 327
328 328
329 void InstructionSelector::VisitConvertUint32ToFloat64(Node* node) {
330 IA32OperandGenerator g(this);
331 // TODO(turbofan): IA32 SSE LoadUint32() should take an operand.
332 Emit(kSSEUint32ToFloat64, g.DefineAsDoubleRegister(node),
333 g.UseRegister(node->InputAt(0)));
334 }
335
336
329 void InstructionSelector::VisitConvertFloat64ToInt32(Node* node) { 337 void InstructionSelector::VisitConvertFloat64ToInt32(Node* node) {
330 IA32OperandGenerator g(this); 338 IA32OperandGenerator g(this);
331 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 339 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
332 } 340 }
333 341
334 342
343 void InstructionSelector::VisitConvertFloat64ToUint32(Node* node) {
344 IA32OperandGenerator g(this);
345 // TODO(turbofan): IA32 SSE subsd() should take an operand.
346 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node),
347 g.UseDoubleRegister(node->InputAt(0)));
348 }
349
350
335 void InstructionSelector::VisitFloat64Add(Node* node) { 351 void InstructionSelector::VisitFloat64Add(Node* node) {
336 IA32OperandGenerator g(this); 352 IA32OperandGenerator g(this);
337 Emit(kSSEFloat64Add, g.DefineSameAsFirst(node), 353 Emit(kSSEFloat64Add, g.DefineSameAsFirst(node),
338 g.UseDoubleRegister(node->InputAt(0)), 354 g.UseDoubleRegister(node->InputAt(0)),
339 g.UseDoubleRegister(node->InputAt(1))); 355 g.UseDoubleRegister(node->InputAt(1)));
340 } 356 }
341 357
342 358
343 void InstructionSelector::VisitFloat64Sub(Node* node) { 359 void InstructionSelector::VisitFloat64Sub(Node* node) {
344 IA32OperandGenerator g(this); 360 IA32OperandGenerator g(this);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 if (descriptor->kind() == CallDescriptor::kCallAddress && 511 if (descriptor->kind() == CallDescriptor::kCallAddress &&
496 buffer.pushed_count > 0) { 512 buffer.pushed_count > 0) {
497 ASSERT(deoptimization == NULL && continuation == NULL); 513 ASSERT(deoptimization == NULL && continuation == NULL);
498 Emit(kPopStack | MiscField::encode(buffer.pushed_count), NULL); 514 Emit(kPopStack | MiscField::encode(buffer.pushed_count), NULL);
499 } 515 }
500 } 516 }
501 517
502 } // namespace compiler 518 } // namespace compiler
503 } // namespace internal 519 } // namespace internal
504 } // namespace v8 520 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-codes-ia32.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698