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

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

Issue 1362783003: X87: [turbofan] Add support for reinterpreting integers as floating point and vice versa. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/compiler/x87/instruction-codes-x87.h ('k') | 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 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 case TruncationMode::kRoundToZero: 658 case TruncationMode::kRoundToZero:
659 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), 659 Emit(kX87Float64ToInt32, g.DefineAsRegister(node),
660 g.Use(node->InputAt(0))); 660 g.Use(node->InputAt(0)));
661 return; 661 return;
662 } 662 }
663 UNREACHABLE(); 663 UNREACHABLE();
664 } 664 }
665 665
666 666
667 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { 667 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) {
668 UNIMPLEMENTED(); 668 X87OperandGenerator g(this);
669 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0)));
670 Emit(kX87BitcastFI, g.DefineAsRegister(node), 0, NULL);
669 } 671 }
670 672
671 673
672 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { 674 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) {
673 UNIMPLEMENTED(); 675 X87OperandGenerator g(this);
676 Emit(kX87BitcastIF, g.DefineAsFixed(node, stX_0), g.Use(node->InputAt(0)));
674 } 677 }
675 678
676 679
677 void InstructionSelector::VisitFloat32Add(Node* node) { 680 void InstructionSelector::VisitFloat32Add(Node* node) {
678 X87OperandGenerator g(this); 681 X87OperandGenerator g(this);
679 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); 682 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0)));
680 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); 683 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1)));
681 Emit(kX87Float32Add, g.DefineAsFixed(node, stX_0), 0, NULL); 684 Emit(kX87Float32Add, g.DefineAsFixed(node, stX_0), 0, NULL);
682 } 685 }
683 686
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 MachineOperatorBuilder::kFloat32Min | 1364 MachineOperatorBuilder::kFloat32Min |
1362 MachineOperatorBuilder::kFloat64Max | 1365 MachineOperatorBuilder::kFloat64Max |
1363 MachineOperatorBuilder::kFloat64Min | 1366 MachineOperatorBuilder::kFloat64Min |
1364 MachineOperatorBuilder::kWord32ShiftIsSafe; 1367 MachineOperatorBuilder::kWord32ShiftIsSafe;
1365 return flags; 1368 return flags;
1366 } 1369 }
1367 1370
1368 } // namespace compiler 1371 } // namespace compiler
1369 } // namespace internal 1372 } // namespace internal
1370 } // namespace v8 1373 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/instruction-codes-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698