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

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: 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 __ andps(i.OutputDoubleRegister(), kScratchDoubleReg); 629 __ andps(i.OutputDoubleRegister(), kScratchDoubleReg);
630 break; 630 break;
631 } 631 }
632 case kSSEFloat32Neg: { 632 case kSSEFloat32Neg: {
633 // TODO(bmeurer): Use 128-bit constants. 633 // TODO(bmeurer): Use 128-bit constants.
634 __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg); 634 __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
635 __ psllq(kScratchDoubleReg, 31); 635 __ psllq(kScratchDoubleReg, 31);
636 __ xorps(i.OutputDoubleRegister(), kScratchDoubleReg); 636 __ xorps(i.OutputDoubleRegister(), kScratchDoubleReg);
637 break; 637 break;
638 } 638 }
639 case kSSEFloat32Round: {
640 CpuFeatureScope sse_scope(masm(), SSE4_1);
641 RoundingMode const mode =
642 static_cast<RoundingMode>(MiscField::decode(instr->opcode()));
643 __ roundss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode);
644 break;
645 }
639 case kSSEFloat64Cmp: 646 case kSSEFloat64Cmp:
640 __ ucomisd(i.InputDoubleRegister(0), i.InputOperand(1)); 647 __ ucomisd(i.InputDoubleRegister(0), i.InputOperand(1));
641 break; 648 break;
642 case kSSEFloat64Add: 649 case kSSEFloat64Add:
643 __ addsd(i.InputDoubleRegister(0), i.InputOperand(1)); 650 __ addsd(i.InputDoubleRegister(0), i.InputOperand(1));
644 break; 651 break;
645 case kSSEFloat64Sub: 652 case kSSEFloat64Sub:
646 __ subsd(i.InputDoubleRegister(0), i.InputOperand(1)); 653 __ subsd(i.InputDoubleRegister(0), i.InputOperand(1));
647 break; 654 break;
648 case kSSEFloat64Mul: 655 case kSSEFloat64Mul:
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1630 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1624 __ Nop(padding_size); 1631 __ Nop(padding_size);
1625 } 1632 }
1626 } 1633 }
1627 1634
1628 #undef __ 1635 #undef __
1629 1636
1630 } // namespace compiler 1637 } // namespace compiler
1631 } // namespace internal 1638 } // namespace internal
1632 } // namespace v8 1639 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698