@@ -350,7 +350,7 @@ void StubCodeCompiler::GenerateExitSafepointStub(Assembler* assembler) {
350350// NOTFP, R4: clobbered, although normally callee-saved
351351void StubCodeCompiler::GenerateCallNativeThroughSafepointStub (
352352 Assembler* assembler) {
353- COMPILE_ASSERT (( kAbiPreservedCpuRegs & ( 1 << R4)) != 0 );
353+ COMPILE_ASSERT (IsAbiPreservedRegister ( R4));
354354
355355 // TransitionGeneratedToNative might clobber LR if it takes the slow path.
356356 __ mov (R4, Operand (LR));
@@ -2867,10 +2867,13 @@ void StubCodeCompiler::GenerateGetCStackPointerStub(Assembler* assembler) {
28672867//
28682868// Notice: We need to keep this in sync with `Simulator::JumpToFrame()`.
28692869void StubCodeCompiler::GenerateJumpToFrameStub (Assembler* assembler) {
2870- ASSERT (kExceptionObjectReg == R0);
2871- ASSERT (kStackTraceObjectReg == R1);
2870+ COMPILE_ASSERT (kExceptionObjectReg == R0);
2871+ COMPILE_ASSERT (kStackTraceObjectReg == R1);
2872+ COMPILE_ASSERT (IsAbiPreservedRegister (R4));
2873+ COMPILE_ASSERT (IsAbiPreservedRegister (THR));
28722874 __ mov (IP, Operand (R1)); // Copy Stack pointer into IP.
2873- __ mov (LR, Operand (R0)); // Program counter.
2875+ // TransitionGeneratedToNative might clobber LR if it takes the slow path.
2876+ __ mov (R4, Operand (R0)); // Program counter.
28742877 __ mov (THR, Operand (R3)); // Thread.
28752878 __ mov (FP, Operand (R2)); // Frame_pointer.
28762879 __ mov (SP, Operand (IP)); // Set Stack pointer.
@@ -2903,7 +2906,7 @@ void StubCodeCompiler::GenerateJumpToFrameStub(Assembler* assembler) {
29032906 } else {
29042907 __ LoadPoolPointer ();
29052908 }
2906- __ bx (LR ); // Jump to continuation point.
2909+ __ bx (R4 ); // Jump to continuation point.
29072910}
29082911
29092912// Run an exception handler. Execution comes from JumpToFrame
0 commit comments