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

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

Issue 1583323004: [turbofan] Add the TruncateFloat32ToInt32 operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a small bug Created 4 years, 11 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
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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); 732 static_cast<RoundingMode>(MiscField::decode(instr->opcode()));
733 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); 733 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode);
734 break; 734 break;
735 } 735 }
736 case kSSEFloat32ToFloat64: 736 case kSSEFloat32ToFloat64:
737 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); 737 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0));
738 break; 738 break;
739 case kSSEFloat64ToFloat32: 739 case kSSEFloat64ToFloat32:
740 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputOperand(0)); 740 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputOperand(0));
741 break; 741 break;
742 case kSSEFloat32ToInt32:
743 __ cvttss2si(i.OutputRegister(), i.InputOperand(0));
744 break;
742 case kSSEFloat64ToInt32: 745 case kSSEFloat64ToInt32:
743 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); 746 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0));
744 break; 747 break;
745 case kSSEFloat64ToUint32: { 748 case kSSEFloat64ToUint32: {
746 __ Move(kScratchDoubleReg, -2147483648.0); 749 __ Move(kScratchDoubleReg, -2147483648.0);
747 __ addsd(kScratchDoubleReg, i.InputOperand(0)); 750 __ addsd(kScratchDoubleReg, i.InputOperand(0));
748 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg); 751 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg);
749 __ add(i.OutputRegister(), Immediate(0x80000000)); 752 __ add(i.OutputRegister(), Immediate(0x80000000));
750 break; 753 break;
751 } 754 }
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1700 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1698 __ Nop(padding_size); 1701 __ Nop(padding_size);
1699 } 1702 }
1700 } 1703 }
1701 1704
1702 #undef __ 1705 #undef __
1703 1706
1704 } // namespace compiler 1707 } // namespace compiler
1705 } // namespace internal 1708 } // namespace internal
1706 } // namespace v8 1709 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698