< prev index next >

src/hotspot/cpu/arm/sharedRuntime_arm.cpp

Print this page

 427         if (ireg & 1) ireg++;
 428         Register r1 = as_Register(ireg);
 429         Register r2 = as_Register(ireg + 1);
 430         regs[i].set_pair(r2->as_VMReg(), r1->as_VMReg());
 431         ireg += 2;
 432       } else {
 433         if (slot & 1) slot++;
 434         regs[i].set_pair(VMRegImpl::stack2reg(slot + 1), VMRegImpl::stack2reg(slot));
 435         slot += 2;
 436         ireg = 4;
 437       }
 438       break;
 439     case T_VOID:
 440       regs[i].set_bad();
 441       break;
 442     default:
 443       ShouldNotReachHere();
 444     }
 445   }
 446 
 447   if (slot & 1) slot++;
 448   return slot;
 449 }
 450 
 451 static void patch_callers_callsite(MacroAssembler *masm) {
 452   Label skip;
 453 
 454   __ ldr(Rtemp, Address(Rmethod, Method::code_offset()));
 455   __ cbz(Rtemp, skip);
 456 
 457   // Pushing an even number of registers for stack alignment.
 458   // Selecting R9, which had to be saved anyway for some platforms.
 459   __ push(RegisterSet(R0, R3) | R9 | LR);
 460   __ fpush_hardfp(FloatRegisterSet(D0, 8));
 461 
 462   __ mov(R0, Rmethod);
 463   __ mov(R1, LR);
 464   __ call(CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite));
 465 
 466   __ fpop_hardfp(FloatRegisterSet(D0, 8));
 467   __ pop(RegisterSet(R0, R3) | R9 | LR);

 427         if (ireg & 1) ireg++;
 428         Register r1 = as_Register(ireg);
 429         Register r2 = as_Register(ireg + 1);
 430         regs[i].set_pair(r2->as_VMReg(), r1->as_VMReg());
 431         ireg += 2;
 432       } else {
 433         if (slot & 1) slot++;
 434         regs[i].set_pair(VMRegImpl::stack2reg(slot + 1), VMRegImpl::stack2reg(slot));
 435         slot += 2;
 436         ireg = 4;
 437       }
 438       break;
 439     case T_VOID:
 440       regs[i].set_bad();
 441       break;
 442     default:
 443       ShouldNotReachHere();
 444     }
 445   }
 446 

 447   return slot;
 448 }
 449 
 450 static void patch_callers_callsite(MacroAssembler *masm) {
 451   Label skip;
 452 
 453   __ ldr(Rtemp, Address(Rmethod, Method::code_offset()));
 454   __ cbz(Rtemp, skip);
 455 
 456   // Pushing an even number of registers for stack alignment.
 457   // Selecting R9, which had to be saved anyway for some platforms.
 458   __ push(RegisterSet(R0, R3) | R9 | LR);
 459   __ fpush_hardfp(FloatRegisterSet(D0, 8));
 460 
 461   __ mov(R0, Rmethod);
 462   __ mov(R1, LR);
 463   __ call(CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite));
 464 
 465   __ fpop_hardfp(FloatRegisterSet(D0, 8));
 466   __ pop(RegisterSet(R0, R3) | R9 | LR);
< prev index next >