Skip to content

Instantly share code, notes, and snippets.

@omnisip
Created December 11, 2020 23:12
Show Gist options
  • Save omnisip/67850c665ac33ced75272b3780f2a937 to your computer and use it in GitHub Desktop.
Save omnisip/67850c665ac33ced75272b3780f2a937 to your computer and use it in GitHub Desktop.
dan@dl360:~/applications/v8/v8$ git diff
diff --git a/src/compiler/backend/x64/code-generator-x64.cc b/src/compiler/backend/x64/code-generator-x64.cc
index 245f503f3a..f1465b839e 100644
--- a/src/compiler/backend/x64/code-generator-x64.cc
+++ b/src/compiler/backend/x64/code-generator-x64.cc
@@ -735,14 +735,16 @@ void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen,
XMMRegister src1 = i.InputSimd128Register(1); \
if (CpuFeatures::IsSupported(AVX)) { \
CpuFeatureScope avx_scope(tasm(), AVX); \
- __ v##UNPACK_INSTR(kScratchDoubleReg, src0, src0); \
- __ v##UNPACK_INSTR(dst, src1, src1); \
+ __ v##UNPACK_INSTR(kScratchDoubleReg, src0, src1); \
+ __ vpsrlq(dst, kScratchDoubleReg, 32); \
__ v##MUL_INSTR(dst, kScratchDoubleReg, dst); \
} else { \
CpuFeatureScope avx_scope(tasm(), SSE4_1); \
DCHECK_EQ(dst, src0); \
- __ pshufd(kScratchDoubleReg, src0, SHUFFLE_CONST); \
- __ pshufd(dst, src1, SHUFFLE_CONST); \
+ __ movdqu(kScratchDoubleReg, src0); \
+ __ UNPACK_INSTR(kScratchDoubleReg, src1); \
+ __ movdqu(dst, kScratchDoubleReg); \
+ __ psrlq(dst, 32); \
__ MUL_INSTR(dst, kScratchDoubleReg); \
} \
} while (false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment