< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page

        

*** 3726,3735 **** --- 3726,3755 ---- cmpptr(value, temp_reg); jcc(Assembler::greaterEqual, not_buffered); } } + void MacroAssembler::test_oop_is_value(Register oop, Register temp, Label* is_value, Label* is_not_value) { + const int mask = Universe::oop_metadata_valuetype_mask(); + assert((is_value != NULL) || (is_not_value != NULL), "Need a label to jump to"); + assert((is_value == NULL) ^ (is_not_value == NULL), "Need one label"); + #ifdef _LP64 + if (UseCompressedClassPointers) { + movl(temp, Address(oop, oopDesc::klass_offset_in_bytes())); + } else + #endif + movptr(temp, Address(oop, oopDesc::klass_offset_in_bytes())); + + andl(temp, mask); + testl(temp, temp); + if (is_not_value != NULL) { + jcc(Assembler::zero, *is_not_value); + } else { + jcc(Assembler::notZero, *is_value); + } + } + void MacroAssembler::os_breakpoint() { // instead of directly emitting a breakpoint, call os:breakpoint for better debugability // (e.g., MSVC can't call ps() otherwise) call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint))); }
< prev index next >