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

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

Issue 1471913006: [turbofan] Implemented the optional Float32RoundDown operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed a debugging printf. Created 5 years 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
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/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 __ andps(i.OutputDoubleRegister(), kScratchDoubleReg); 643 __ andps(i.OutputDoubleRegister(), kScratchDoubleReg);
644 break; 644 break;
645 } 645 }
646 case kSSEFloat32Neg: { 646 case kSSEFloat32Neg: {
647 // TODO(bmeurer): Use 128-bit constants. 647 // TODO(bmeurer): Use 128-bit constants.
648 __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg); 648 __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
649 __ psllq(kScratchDoubleReg, 31); 649 __ psllq(kScratchDoubleReg, 31);
650 __ xorps(i.OutputDoubleRegister(), kScratchDoubleReg); 650 __ xorps(i.OutputDoubleRegister(), kScratchDoubleReg);
651 break; 651 break;
652 } 652 }
653 case kSSEFloat32Round: {
654 CpuFeatureScope sse_scope(masm(), SSE4_1);
655 RoundingMode const mode =
656 static_cast<RoundingMode>(MiscField::decode(instr->opcode()));
657 __ roundss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode);
658 break;
659 }
653 case kSSEFloat64Cmp: 660 case kSSEFloat64Cmp:
654 __ ucomisd(i.InputDoubleRegister(0), i.InputOperand(1)); 661 __ ucomisd(i.InputDoubleRegister(0), i.InputOperand(1));
655 break; 662 break;
656 case kSSEFloat64Add: 663 case kSSEFloat64Add:
657 __ addsd(i.InputDoubleRegister(0), i.InputOperand(1)); 664 __ addsd(i.InputDoubleRegister(0), i.InputOperand(1));
658 break; 665 break;
659 case kSSEFloat64Sub: 666 case kSSEFloat64Sub:
660 __ subsd(i.InputDoubleRegister(0), i.InputOperand(1)); 667 __ subsd(i.InputDoubleRegister(0), i.InputOperand(1));
661 break; 668 break;
662 case kSSEFloat64Mul: 669 case kSSEFloat64Mul:
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1652 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1646 __ Nop(padding_size); 1653 __ Nop(padding_size);
1647 } 1654 }
1648 } 1655 }
1649 1656
1650 #undef __ 1657 #undef __
1651 1658
1652 } // namespace compiler 1659 } // namespace compiler
1653 } // namespace internal 1660 } // namespace internal
1654 } // namespace v8 1661 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698