Commit 5ef538f7 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

Better codegen for setting top bit of I64x2

Bug: v8:8460
Change-Id: I132f7332d3dda572b72404ca20297c4defb5c62b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708450Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62815}
parent f8047441
......@@ -2598,10 +2598,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
XMMRegister src = i.InputSimd128Register(1);
XMMRegister tmp = i.ToSimd128Register(instr->TempAt(0));
// Sets up a mask to clear the sign bit of the 2 quadwords.
__ Set(kScratchRegister, 0x8000000000000000);
__ movq(kScratchDoubleReg, kScratchRegister);
__ pshufd(kScratchDoubleReg, kScratchDoubleReg, 0x44);
__ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
__ psllq(kScratchDoubleReg, 63);
__ movaps(tmp, src);
__ pxor(tmp, kScratchDoubleReg);
......@@ -2616,10 +2614,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
XMMRegister src = i.InputSimd128Register(1);
XMMRegister tmp = i.ToSimd128Register(instr->TempAt(0));
// Sets up a mask to clear the sign bit of the 2 quadwords.
__ Set(kScratchRegister, 0x8000000000000000);
__ movq(kScratchDoubleReg, kScratchRegister);
__ pshufd(kScratchDoubleReg, kScratchDoubleReg, 0x44);
__ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
__ psllq(kScratchDoubleReg, 63);
__ movaps(tmp, src);
__ pxor(dst, kScratchDoubleReg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment