Commit a4b615eb authored by Kanghua Yu's avatar Kanghua Yu Committed by Commit Bot

[x64] Use XOR instruction to zero register in SpeculationPoison

kind = BYTECODE_HANDLER
name = Wide
compiler = turbofan
Body (size = 64)
Instructions (size = 56)
                  -- Prologue: generate speculation poison --
0x3f54d38b5c0     0  488d1df9ffffff REX.W leaq rbx,[rip+0xfffffff9]
0x3f54d38b5c7     7  49c7c100000000 REX.W movq r9,0x0

=>
...
Body (size = 60)
Instructions (size = 52)
                  -- Prologue: generate speculation poison --
0x3f54d38b5c0     0  488d1df9ffffff REX.W leaq rbx,[rip+0xfffffff9]
0x3f54d38b5c7     7  4533c9         xorl r9,r9

Change-Id: I2e3926a01423a979fd77cfc0c0081f049bb01eb8
Reviewed-on: https://chromium-review.googlesource.com/940778Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Cr-Commit-Position: refs/heads/master@{#51641}
parent 0d2c85b7
......@@ -610,7 +610,7 @@ void CodeGenerator::GenerateSpeculationPoison() {
// Set a mask which has all bits set in the normal case, but has all
// bits cleared if we are speculatively executing the wrong PC.
__ ComputeCodeStartAddress(rbx);
__ movp(kSpeculationPoisonRegister, Immediate(0));
__ xorq(kSpeculationPoisonRegister, kSpeculationPoisonRegister);
__ cmpp(kJavaScriptCallCodeStartRegister, rbx);
__ movp(rbx, Immediate(-1));
__ cmovq(equal, kSpeculationPoisonRegister, rbx);
......
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