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

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

Issue 1440293002: [turbofan] Added the optional Float64RoundTiesEven operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@f64roundup
Patch Set: Disabled F64RoundTiesEven on mips32 Created 5 years, 1 month 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 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 #include "src/compiler/gap-resolver.h" 7 #include "src/compiler/gap-resolver.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/osr.h" 9 #include "src/compiler/osr.h"
10 #include "src/mips/macro-assembler-mips.h" 10 #include "src/mips/macro-assembler-mips.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 }; 206 };
207 207
208 208
209 class OutOfLineCeil final : public OutOfLineRound { 209 class OutOfLineCeil final : public OutOfLineRound {
210 public: 210 public:
211 OutOfLineCeil(CodeGenerator* gen, DoubleRegister result) 211 OutOfLineCeil(CodeGenerator* gen, DoubleRegister result)
212 : OutOfLineRound(gen, result) {} 212 : OutOfLineRound(gen, result) {}
213 }; 213 };
214 214
215 215
216 class OutOfLineTiesEven final : public OutOfLineRound {
217 public:
218 OutOfLineTiesEven(CodeGenerator* gen, DoubleRegister result)
219 : OutOfLineRound(gen, result) {}
220 };
221
222
216 class OutOfLineRecordWrite final : public OutOfLineCode { 223 class OutOfLineRecordWrite final : public OutOfLineCode {
217 public: 224 public:
218 OutOfLineRecordWrite(CodeGenerator* gen, Register object, Register index, 225 OutOfLineRecordWrite(CodeGenerator* gen, Register object, Register index,
219 Register value, Register scratch0, Register scratch1, 226 Register value, Register scratch0, Register scratch1,
220 RecordWriteMode mode) 227 RecordWriteMode mode)
221 : OutOfLineCode(gen), 228 : OutOfLineCode(gen),
222 object_(object), 229 object_(object),
223 index_(index), 230 index_(index),
224 value_(value), 231 value_(value),
225 scratch0_(scratch0), 232 scratch0_(scratch0),
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 break; 861 break;
855 } 862 }
856 case kMips64Float64RoundTruncate: { 863 case kMips64Float64RoundTruncate: {
857 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); 864 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate);
858 break; 865 break;
859 } 866 }
860 case kMips64Float64RoundUp: { 867 case kMips64Float64RoundUp: {
861 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil); 868 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil);
862 break; 869 break;
863 } 870 }
871 case kMips64Float64RoundTiesEven: {
872 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(round_l_d, TiesEven);
873 break;
874 }
864 case kMips64Float64Max: { 875 case kMips64Float64Max: {
865 // (b < a) ? a : b 876 // (b < a) ? a : b
866 if (kArchVariant == kMips64r6) { 877 if (kArchVariant == kMips64r6) {
867 __ cmp_d(OLT, i.OutputDoubleRegister(), i.InputDoubleRegister(1), 878 __ cmp_d(OLT, i.OutputDoubleRegister(), i.InputDoubleRegister(1),
868 i.InputDoubleRegister(0)); 879 i.InputDoubleRegister(0));
869 __ sel_d(i.OutputDoubleRegister(), i.InputDoubleRegister(1), 880 __ sel_d(i.OutputDoubleRegister(), i.InputDoubleRegister(1),
870 i.InputDoubleRegister(0)); 881 i.InputDoubleRegister(0));
871 } else { 882 } else {
872 __ c_d(OLT, i.InputDoubleRegister(0), i.InputDoubleRegister(1)); 883 __ c_d(OLT, i.InputDoubleRegister(0), i.InputDoubleRegister(1));
873 // Left operand is result, passthrough if false. 884 // Left operand is result, passthrough if false.
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 padding_size -= v8::internal::Assembler::kInstrSize; 1688 padding_size -= v8::internal::Assembler::kInstrSize;
1678 } 1689 }
1679 } 1690 }
1680 } 1691 }
1681 1692
1682 #undef __ 1693 #undef __
1683 1694
1684 } // namespace compiler 1695 } // namespace compiler
1685 } // namespace internal 1696 } // namespace internal
1686 } // namespace v8 1697 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698