< prev index next >

src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp

Print this page

*** 1381,1390 **** --- 1381,1391 ---- __ verify_oop(dest->as_register()); } } else if (type == T_ADDRESS && addr->disp() == oopDesc::klass_offset_in_bytes()) { #ifdef _LP64 if (UseCompressedClassPointers) { + __ andl(dest->as_register(), oopDesc::compressed_klass_mask()); __ decode_klass_not_null(dest->as_register()); } #endif } }
*** 1929,1940 **** } } void LIR_Assembler::emit_opFlattenedArrayCheck(LIR_OpFlattenedArrayCheck* op) { ! // We are loading/storing an array that *may* be a flattened array (e.g., the declared type ! // is Object[]). If this array is flattened, take slow path. __ load_storage_props(op->tmp()->as_register(), op->array()->as_register()); __ testb(op->tmp()->as_register(), ArrayStorageProperties::flattened_value); __ jcc(Assembler::notZero, *op->stub()->entry()); if (!op->value()->is_illegal()) { --- 1930,1941 ---- } } void LIR_Assembler::emit_opFlattenedArrayCheck(LIR_OpFlattenedArrayCheck* op) { ! // We are loading/storing an array that *may* be a flattened array (the declared type ! // Object[], interface[], or VT?[]). If this array is flattened, take slow path. __ load_storage_props(op->tmp()->as_register(), op->array()->as_register()); __ testb(op->tmp()->as_register(), ArrayStorageProperties::flattened_value); __ jcc(Assembler::notZero, *op->stub()->entry()); if (!op->value()->is_illegal()) {
*** 1951,1961 **** } void LIR_Assembler::emit_opNullFreeArrayCheck(LIR_OpNullFreeArrayCheck* op) { // This is called when we use aastore into a an array declared as "[LVT;", // where we know VT is not flattenable (due to ValueArrayElemMaxFlatOops, etc). ! // However, we need to do a NULL check if the actual array is a "QLVT;". __ load_storage_props(op->tmp()->as_register(), op->array()->as_register()); __ testb(op->tmp()->as_register(), ArrayStorageProperties::null_free_value); } --- 1952,1962 ---- } void LIR_Assembler::emit_opNullFreeArrayCheck(LIR_OpNullFreeArrayCheck* op) { // This is called when we use aastore into a an array declared as "[LVT;", // where we know VT is not flattenable (due to ValueArrayElemMaxFlatOops, etc). ! // However, we need to do a NULL check if the actual array is a "[QVT;". __ load_storage_props(op->tmp()->as_register(), op->array()->as_register()); __ testb(op->tmp()->as_register(), ArrayStorageProperties::null_free_value); }
*** 3076,3097 **** assert(offset_from_rsp_in_bytes < frame_map()->reserved_argument_area_size(), "invalid offset"); __ mov_metadata(Address(rsp, offset_from_rsp_in_bytes), m); } ! void LIR_Assembler::arraycopy_flat_check(Register obj, Register tmp, CodeStub* slow_path) { ! Address klass_addr = Address(obj, oopDesc::klass_offset_in_bytes()); ! if (UseCompressedClassPointers) { ! __ movl(tmp, klass_addr); ! LP64_ONLY(__ decode_klass_not_null(tmp)); } else { ! __ movptr(tmp, klass_addr); } ! __ movl(tmp, Address(tmp, Klass::layout_helper_offset())); ! __ sarl(tmp, Klass::_lh_array_tag_shift); ! __ cmpl(tmp, Klass::_lh_array_tag_vt_value); ! __ jcc(Assembler::equal, *slow_path->entry()); } // This code replaces a call to arraycopy; no exception may // be thrown in this code, they must be thrown in the System.arraycopy --- 3077,3096 ---- assert(offset_from_rsp_in_bytes < frame_map()->reserved_argument_area_size(), "invalid offset"); __ mov_metadata(Address(rsp, offset_from_rsp_in_bytes), m); } ! void LIR_Assembler::arraycopy_valuetype_check(Register obj, Register tmp, CodeStub* slow_path, bool is_dest) { ! __ load_storage_props(tmp, obj); ! if (is_dest) { ! // We also take slow path if it's a null_free destination array, just in case the source array ! // contains NULLs. ! __ testb(tmp, ArrayStorageProperties::flattened_value | ArrayStorageProperties::null_free_value); } else { ! __ testb(tmp, ArrayStorageProperties::flattened_value); } ! __ jcc(Assembler::notEqual, *slow_path->entry()); } // This code replaces a call to arraycopy; no exception may // be thrown in this code, they must be thrown in the System.arraycopy
*** 3117,3132 **** __ jmp(*stub->entry()); __ bind(*stub->continuation()); return; } ! if (flags & LIR_OpArrayCopy::src_flat_check) { ! arraycopy_flat_check(src, tmp, stub); } ! if (flags & LIR_OpArrayCopy::dst_flat_check) { ! arraycopy_flat_check(dst, tmp, stub); } // if we don't know anything, just go through the generic arraycopy if (default_type == NULL) { // save outgoing arguments on stack in case call to System.arraycopy is needed --- 3116,3131 ---- __ jmp(*stub->entry()); __ bind(*stub->continuation()); return; } ! if (flags & LIR_OpArrayCopy::src_valuetype_check) { ! arraycopy_valuetype_check(src, tmp, stub, false); } ! if (flags & LIR_OpArrayCopy::dst_valuetype_check) { ! arraycopy_valuetype_check(dst, tmp, stub, true); } // if we don't know anything, just go through the generic arraycopy if (default_type == NULL) { // save outgoing arguments on stack in case call to System.arraycopy is needed
< prev index next >