PPC: pass a scratch reg when using register_location

Change-Id: I43e4a4cadc60e958d6c9d80e725a49a3e36d8ba9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3797832
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#82146}
This commit is contained in:
Milad Fa 2022-08-01 12:01:41 -04:00 committed by V8 LUCI CQ
parent 5903aa9354
commit 9861ce1dea

View File

@ -1139,7 +1139,7 @@ void RegExpMacroAssemblerPPC::WriteStackPointerToRegister(int reg) {
__ mov(r4, Operand(ref)); __ mov(r4, Operand(ref));
__ LoadU64(r4, MemOperand(r4)); __ LoadU64(r4, MemOperand(r4));
__ SubS64(r3, backtrack_stackpointer(), r4); __ SubS64(r3, backtrack_stackpointer(), r4);
__ StoreU64(r3, register_location(reg)); __ StoreU64(r3, register_location(reg), r0);
} }
void RegExpMacroAssemblerPPC::ReadStackPointerFromRegister(int reg) { void RegExpMacroAssemblerPPC::ReadStackPointerFromRegister(int reg) {
@ -1147,7 +1147,7 @@ void RegExpMacroAssemblerPPC::ReadStackPointerFromRegister(int reg) {
ExternalReference::address_of_regexp_stack_memory_top_address(isolate()); ExternalReference::address_of_regexp_stack_memory_top_address(isolate());
__ mov(r3, Operand(ref)); __ mov(r3, Operand(ref));
__ LoadU64(r3, MemOperand(r3)); __ LoadU64(r3, MemOperand(r3));
__ LoadU64(backtrack_stackpointer(), register_location(reg)); __ LoadU64(backtrack_stackpointer(), register_location(reg), r0);
__ AddS64(backtrack_stackpointer(), backtrack_stackpointer(), r3); __ AddS64(backtrack_stackpointer(), backtrack_stackpointer(), r3);
} }