< prev index next >

src/hotspot/cpu/arm/macroAssembler_arm.cpp

Print this page

        

*** 1364,1376 **** str(tmp, Address(Rthread, in_bytes(JavaThread::allocated_bytes_offset()))); #else // Bump total bytes allocated by this thread Label done; ! ldr(tmp, Address(Rthread, in_bytes(JavaThread::allocated_bytes_offset()))); adds(tmp, tmp, size_in_bytes); ! str(tmp, Address(Rthread, in_bytes(JavaThread::allocated_bytes_offset())), cc); b(done, cc); // Increment the high word and store single-copy atomically (that is an unlikely scenario on typical embedded systems as it means >4GB has been allocated) // To do so ldrd/strd instructions used which require an even-odd pair of registers. Such a request could be difficult to satisfy by // allocating those registers on a higher level, therefore the routine is ready to allocate a pair itself. --- 1364,1379 ---- str(tmp, Address(Rthread, in_bytes(JavaThread::allocated_bytes_offset()))); #else // Bump total bytes allocated by this thread Label done; ! // Borrow the Rthread for alloc counter ! Register Ralloc = Rthread; ! add(Ralloc, Ralloc, in_bytes(JavaThread::allocated_bytes_offset())); ! ldr(tmp, Address(Ralloc)); adds(tmp, tmp, size_in_bytes); ! str(tmp, Address(Ralloc), cc); b(done, cc); // Increment the high word and store single-copy atomically (that is an unlikely scenario on typical embedded systems as it means >4GB has been allocated) // To do so ldrd/strd instructions used which require an even-odd pair of registers. Such a request could be difficult to satisfy by // allocating those registers on a higher level, therefore the routine is ready to allocate a pair itself.
*** 1384,1401 **** low = R0; high = R1; } push(RegisterSet(low, high)); ! ldrd(low, Address(Rthread, in_bytes(JavaThread::allocated_bytes_offset()))); adds(low, low, size_in_bytes); adc(high, high, 0); ! strd(low, Address(Rthread, in_bytes(JavaThread::allocated_bytes_offset()))); pop(RegisterSet(low, high)); bind(done); #endif // AARCH64 } void MacroAssembler::arm_stack_overflow_check(int frame_size_in_bytes, Register tmp) { // Version of AbstractAssembler::generate_stack_overflow_check optimized for ARM --- 1387,1407 ---- low = R0; high = R1; } push(RegisterSet(low, high)); ! ldrd(low, Address(Ralloc)); adds(low, low, size_in_bytes); adc(high, high, 0); ! strd(low, Address(Ralloc)); pop(RegisterSet(low, high)); bind(done); + + // Unborrow the Rthread + sub(Rthread, Ralloc, in_bytes(JavaThread::allocated_bytes_offset())); #endif // AARCH64 } void MacroAssembler::arm_stack_overflow_check(int frame_size_in_bytes, Register tmp) { // Version of AbstractAssembler::generate_stack_overflow_check optimized for ARM
< prev index next >