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

[x64] Reduce sub instruction in ComputeCodeStartAddress()

Merge sub with lea if pc_offset is not zero when computing code start address.

Change-Id: I20df6bc1b9a6c1d1f2c97b3de3e85252cea7caec
Reviewed-on: https://chromium-review.googlesource.com/1088318Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
Cr-Commit-Position: refs/heads/master@{#53541}
parent c71690d5
......@@ -2749,10 +2749,7 @@ void TurboAssembler::ComputeCodeStartAddress(Register dst) {
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));
}
leaq(dst, Operand(&current, -pc));
}
void TurboAssembler::ResetSpeculationPoisonRegister() {
......
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