Commit 0645b9e2 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[codegen] Register conflict in arm macro assembler

{LoadFromConstantsTable} uses r7 as a temporary register. This can
conflict with the load destination register, so use another register in
this case.

R=jgruber@chromium.org
CC=tebbi@chromium.org

Bug: v8:10077
Change-Id: I3359f31ab4b17838464ee9bf0828308161fb9c0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1985990
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65606}
parent 3f675bbd
......@@ -132,16 +132,15 @@ void TurboAssembler::LoadFromConstantsTable(Register destination,
Register reg = destination;
if (could_clobber_ip) {
Push(r7);
reg = r7;
reg = destination != r7 ? r7 : r8;
Push(reg);
}
LoadRoot(reg, RootIndex::kBuiltinsConstantsTable);
ldr(destination, MemOperand(reg, offset));
if (could_clobber_ip) {
DCHECK_EQ(reg, r7);
Pop(r7);
Pop(reg);
}
}
......
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