< prev index next >

src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp

Print this page
rev 54670 : Port of valuetypes to aarch64

*** 33,42 **** --- 33,43 ---- #include "logging/log.hpp" #include "oops/arrayOop.hpp" #include "oops/markOop.hpp" #include "oops/method.hpp" #include "oops/methodData.hpp" + #include "oops/valueKlass.hpp" #include "prims/jvmtiExport.hpp" #include "prims/jvmtiThreadState.hpp" #include "runtime/basicLock.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/frame.inline.hpp"
*** 654,663 **** --- 655,665 ---- // remove activation // get sender esp ldr(esp, Address(rfp, frame::interpreter_frame_sender_sp_offset * wordSize)); + if (StackReservedPages > 0) { // testing if reserved zone needs to be re-enabled Label no_reserved_zone_enabling; ldr(rscratch1, Address(rthread, JavaThread::reserved_stack_activation_offset()));
*** 670,679 **** --- 672,705 ---- InterpreterRuntime::throw_delayed_StackOverflowError)); should_not_reach_here(); bind(no_reserved_zone_enabling); } + + if (state == atos && ValueTypeReturnedAsFields) { + Label skip; + + // Test if the return type is a value type + ldr(rscratch1, Address(rfp, frame::interpreter_frame_method_offset * wordSize)); + ldr(rscratch1, Address(rscratch1, Method::const_offset())); + ldrb(rscratch1, Address(rscratch1, ConstMethod::result_type_offset())); + cmpw(rscratch1, (u1) T_VALUETYPE); + br(Assembler::NE, skip); + + // We are returning a value type, load its fields into registers + // Load fields from a buffered value with a value class specific handler + + load_klass(rscratch1 /*dst*/, r0 /*src*/); + ldr(rscratch1, Address(rscratch1, InstanceKlass::adr_valueklass_fixed_block_offset())); + ldr(rscratch1, Address(rscratch1, ValueKlass::unpack_handler_offset())); + cbz(rscratch1, skip); + + blrt(rscratch1, 1, 0, 0); + + bind(skip); + } + // remove frame anchor leave(); // If we're returning to interpreted code we will shortly be // adjusting SP to allow some space for ESP. If we're returning to // compiled code the saved sender SP was saved in sender_sp, so this
*** 723,732 **** --- 749,763 ---- orr(swap_reg, rscratch1, 1); // Save (object->mark() | 1) into BasicLock's displaced header str(swap_reg, Address(lock_reg, mark_offset)); + if (EnableValhalla && !UseBiasedLocking) { + // For slow path is_always_locked, using biased, which is never natural for !UseBiasLocking + andr(swap_reg, swap_reg, ~markOopDesc::biased_lock_bit_in_place); + } + assert(lock_offset == 0, "displached header must be first word in BasicObjectLock"); Label fail; if (PrintBiasedLockingStatistics) {
< prev index next >