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

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

Issue 1413013003: [x64] Implement vcvtqsi2sd AVX instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/test-assembler-x64.cc » ('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 32581396fb010aad6c33d99d1c947438083b9a30..a202d099d32e31a2b51fba7fceb5556a7d2cb0bf 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -851,6 +851,18 @@ void MacroAssembler::Cvtlsi2sd(XMMRegister dst, const Operand& src) {
}
+void MacroAssembler::Cvtqsi2sd(XMMRegister dst, Register 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::Cvttsd2si(Register dst, XMMRegister src) {
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
@@ -3457,7 +3469,7 @@ void MacroAssembler::LoadUint32(XMMRegister dst,
cmpq(src, Immediate(0xffffffff));
Assert(below_equal, kInputGPRIsExpectedToHaveUpper32Cleared);
}
- cvtqsi2sd(dst, src);
+ Cvtqsi2sd(dst, src);
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698