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

Side by Side Diff: src/x64/assembler-x64.h

Issue 990963003: [turbofan] Unify Math.floor / Math.ceil optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | src/x64/assembler-x64.cc » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 case greater_equal: 353 case greater_equal:
354 return less_equal; 354 return less_equal;
355 case less_equal: 355 case less_equal:
356 return greater_equal; 356 return greater_equal;
357 default: 357 default:
358 return cc; 358 return cc;
359 } 359 }
360 } 360 }
361 361
362 362
363 enum RoundingMode {
364 kRoundToNearest = 0x0,
365 kRoundDown = 0x1,
366 kRoundUp = 0x2,
367 kRoundToZero = 0x3
368 };
369
370
363 // ----------------------------------------------------------------------------- 371 // -----------------------------------------------------------------------------
364 // Machine instruction Immediates 372 // Machine instruction Immediates
365 373
366 class Immediate BASE_EMBEDDED { 374 class Immediate BASE_EMBEDDED {
367 public: 375 public:
368 explicit Immediate(int32_t value) : value_(value) {} 376 explicit Immediate(int32_t value) : value_(value) {}
369 explicit Immediate(Smi* value) { 377 explicit Immediate(Smi* value) {
370 DCHECK(SmiValuesAre31Bits()); // Only available for 31-bit SMI. 378 DCHECK(SmiValuesAre31Bits()); // Only available for 31-bit SMI.
371 value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value)); 379 value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value));
372 } 380 }
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 void punpckhdq(XMMRegister dst, XMMRegister src); 1145 void punpckhdq(XMMRegister dst, XMMRegister src);
1138 1146
1139 // SSE 4.1 instruction 1147 // SSE 4.1 instruction
1140 void extractps(Register dst, XMMRegister src, byte imm8); 1148 void extractps(Register dst, XMMRegister src, byte imm8);
1141 1149
1142 void pextrd(Register dst, XMMRegister src, int8_t imm8); 1150 void pextrd(Register dst, XMMRegister src, int8_t imm8);
1143 1151
1144 void pinsrd(XMMRegister dst, Register src, int8_t imm8); 1152 void pinsrd(XMMRegister dst, Register src, int8_t imm8);
1145 void pinsrd(XMMRegister dst, const Operand& src, int8_t imm8); 1153 void pinsrd(XMMRegister dst, const Operand& src, int8_t imm8);
1146 1154
1147 enum RoundingMode {
1148 kRoundToNearest = 0x0,
1149 kRoundDown = 0x1,
1150 kRoundUp = 0x2,
1151 kRoundToZero = 0x3
1152 };
1153
1154 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); 1155 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode);
1155 1156
1156 // AVX instruction 1157 // AVX instruction
1157 void vfmadd132sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { 1158 void vfmadd132sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
1158 vfmasd(0x99, dst, src1, src2); 1159 vfmasd(0x99, dst, src1, src2);
1159 } 1160 }
1160 void vfmadd213sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { 1161 void vfmadd213sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
1161 vfmasd(0xa9, dst, src1, src2); 1162 vfmasd(0xa9, dst, src1, src2);
1162 } 1163 }
1163 void vfmadd231sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { 1164 void vfmadd231sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 private: 1864 private:
1864 Assembler* assembler_; 1865 Assembler* assembler_;
1865 #ifdef DEBUG 1866 #ifdef DEBUG
1866 int space_before_; 1867 int space_before_;
1867 #endif 1868 #endif
1868 }; 1869 };
1869 1870
1870 } } // namespace v8::internal 1871 } } // namespace v8::internal
1871 1872
1872 #endif // V8_X64_ASSEMBLER_X64_H_ 1873 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698