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

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

Issue 1476063002: [turbofan] Implemented the TruncateFloat32ToInt64 TurboFan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Increased the type of opcodes from uint8_t to uint16_t. 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
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('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/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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 __ Cvt_s_ul(i.OutputDoubleRegister(), i.InputRegister(0)); 984 __ Cvt_s_ul(i.OutputDoubleRegister(), i.InputRegister(0));
985 break; 985 break;
986 } 986 }
987 case kMips64TruncWD: { 987 case kMips64TruncWD: {
988 FPURegister scratch = kScratchDoubleReg; 988 FPURegister scratch = kScratchDoubleReg;
989 // Other arches use round to zero here, so we follow. 989 // Other arches use round to zero here, so we follow.
990 __ trunc_w_d(scratch, i.InputDoubleRegister(0)); 990 __ trunc_w_d(scratch, i.InputDoubleRegister(0));
991 __ mfc1(i.OutputRegister(), scratch); 991 __ mfc1(i.OutputRegister(), scratch);
992 break; 992 break;
993 } 993 }
994 case kMips64TruncLS: {
995 FPURegister scratch = kScratchDoubleReg;
996 // Other arches use round to zero here, so we follow.
997 __ trunc_l_s(scratch, i.InputDoubleRegister(0));
998 __ dmfc1(i.OutputRegister(), scratch);
999 break;
1000 }
994 case kMips64TruncLD: { 1001 case kMips64TruncLD: {
995 FPURegister scratch = kScratchDoubleReg; 1002 FPURegister scratch = kScratchDoubleReg;
996 // Other arches use round to zero here, so we follow. 1003 // Other arches use round to zero here, so we follow.
997 __ trunc_l_d(scratch, i.InputDoubleRegister(0)); 1004 __ trunc_l_d(scratch, i.InputDoubleRegister(0));
998 __ dmfc1(i.OutputRegister(), scratch); 1005 __ dmfc1(i.OutputRegister(), scratch);
999 break; 1006 break;
1000 } 1007 }
1001 case kMips64TruncUwD: { 1008 case kMips64TruncUwD: {
1002 FPURegister scratch = kScratchDoubleReg; 1009 FPURegister scratch = kScratchDoubleReg;
1003 // TODO(plind): Fix wrong param order of Trunc_uw_d() macro-asm function. 1010 // TODO(plind): Fix wrong param order of Trunc_uw_d() macro-asm function.
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 padding_size -= v8::internal::Assembler::kInstrSize; 1735 padding_size -= v8::internal::Assembler::kInstrSize;
1729 } 1736 }
1730 } 1737 }
1731 } 1738 }
1732 1739
1733 #undef __ 1740 #undef __
1734 1741
1735 } // namespace compiler 1742 } // namespace compiler
1736 } // namespace internal 1743 } // namespace internal
1737 } // namespace v8 1744 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698