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

Unified Diff: src/x64/macro-assembler-x64.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/codegen-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 9952eb3b659678f11768997de16e269637575458..f23c9336e3dcabe2c59fcba5c0592629918d8a44 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -918,6 +918,26 @@ void MacroAssembler::Cvtsd2si(Register dst, XMMRegister src) {
}
+void MacroAssembler::Cvttss2si(Register dst, XMMRegister src) {
+ if (CpuFeatures::IsSupported(AVX)) {
+ CpuFeatureScope scope(this, AVX);
+ vcvttss2si(dst, src);
+ } else {
+ cvttss2si(dst, src);
+ }
+}
+
+
+void MacroAssembler::Cvttss2si(Register dst, const Operand& src) {
+ if (CpuFeatures::IsSupported(AVX)) {
+ CpuFeatureScope scope(this, AVX);
+ vcvttss2si(dst, src);
+ } else {
+ cvttss2si(dst, src);
+ }
+}
+
+
void MacroAssembler::Cvttsd2si(Register dst, XMMRegister src) {
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/codegen-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698