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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 1424333002: [turbofan] Added the RoundInt64ToFloat64 instruction to TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@BufferedRawMachineAssemblerTester
Patch Set: Renamed ChangeInt64ToFloat64 to RoundInt64ToFloat64, and removed the Signed64 type again. 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 side-by-side diff with in-line comments
Download patch
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 48ad4c347e7d715f2bdf35b07e4777638738bed0..d10e45e68d717219089cc343fc1059447e83a4d8 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -863,6 +863,18 @@ void MacroAssembler::Cvtqsi2sd(XMMRegister dst, Register src) {
}
+void MacroAssembler::Cvtqsi2sd(XMMRegister dst, const Operand& src) {
+ if (CpuFeatures::IsSupported(AVX)) {
+ CpuFeatureScope scope(this, AVX);
+ vxorpd(dst, dst, dst);
+ vcvtqsi2sd(dst, dst, src);
+ } else {
+ xorpd(dst, dst);
+ cvtqsi2sd(dst, src);
+ }
+}
+
+
void MacroAssembler::Cvtsd2si(Register dst, XMMRegister src) {
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);

Powered by Google App Engine
This is Rietveld 408576698