Commit d65c8cbf authored by jyan's avatar jyan Committed by Commit bot

S390: Fix Register conflict in CEntryStub

when needs_return_buffer == true and result_size() > 2, the 3rd return value
is placed in r4 register. But when debug code is emited, it uses r4 register
for checking exceptions, which corrupts the 3rd return value.

R=joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1839663002

Cr-Commit-Position: refs/heads/master@{#35084}
parent 36ead519
......@@ -1104,9 +1104,9 @@ void CEntryStub::Generate(MacroAssembler* masm) {
Label okay;
ExternalReference pending_exception_address(
Isolate::kPendingExceptionAddress, isolate());
__ mov(r4, Operand(pending_exception_address));
__ LoadP(r4, MemOperand(r4));
__ CompareRoot(r4, Heap::kTheHoleValueRootIndex);
__ mov(r1, Operand(pending_exception_address));
__ LoadP(r1, MemOperand(r1));
__ CompareRoot(r1, Heap::kTheHoleValueRootIndex);
// Cannot use check here as it attempts to generate call into runtime.
__ beq(&okay, Label::kNear);
__ stop("Unexpected pending exception");
......
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