Commit a404fe44 authored by Shiyu Zhang's avatar Shiyu Zhang Committed by Commit Bot

[x64] Remove unnecessary SUB in ComputeCodeStartAddress()

This patch removes one unnecessary sub instruction in ComputeCodeStartAddress for SpeculationPoison generation at the beginning of each bytecode handler.

leaq rbx,[rip+0x0]      => leaq rbx,[rip+0xfffffff9]
subq rbx,0x7            => To be removed
movq r9,0x0
cmpq rcx,rbx
movq rbx,0xffffffff
cmovzq r9,rbx


Change-Id: I7648ae27d4039488d1fc0f4c25477a5cb889bd6d
Reviewed-on: https://chromium-review.googlesource.com/933593Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
Cr-Commit-Position: refs/heads/master@{#51537}
parent 9b136709
......@@ -2737,10 +2737,10 @@ void TurboAssembler::CheckPageFlag(Register object, Register scratch, int mask,
void TurboAssembler::ComputeCodeStartAddress(Register dst) {
Label current;
// Load effective address to get the address of the current instruction.
leaq(dst, Operand(&current));
bind(&current);
int pc = pc_offset();
// Load effective address to get the address of the current instruction.
leaq(dst, Operand(&current));
if (pc != 0) {
subq(dst, Immediate(pc));
}
......
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