< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page




3711   // Test below is ordered based on the relative positions of
3712   // the Java heap and the VTBuffer to execute a single test for heap-allocated values
3713 
3714   if (VTBuffer::base() < Universe::heap()->base()) {
3715     lea(temp_reg, VTBuffer_end);
3716     cmpptr(value, temp_reg);
3717     jcc(Assembler::greaterEqual, not_buffered);
3718     lea(temp_reg, VTBuffer_top);
3719     cmpptr(value, temp_reg);
3720     jcc(Assembler::less, not_buffered);
3721   } else {
3722     lea(temp_reg, VTBuffer_top);
3723     cmpptr(value, temp_reg);
3724     jcc(Assembler::less, not_buffered);
3725     lea(temp_reg, VTBuffer_end);
3726     cmpptr(value, temp_reg);
3727     jcc(Assembler::greaterEqual, not_buffered);
3728   }
3729 }
3730 














3731 void MacroAssembler::os_breakpoint() {
3732   // instead of directly emitting a breakpoint, call os:breakpoint for better debugability
3733   // (e.g., MSVC can't call ps() otherwise)
3734   call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
3735 }
3736 
3737 void MacroAssembler::unimplemented(const char* what) {
3738   const char* buf = NULL;
3739   {
3740     ResourceMark rm;
3741     stringStream ss;
3742     ss.print("unimplemented: %s", what);
3743     buf = code_string(ss.as_string());
3744   }
3745   stop(buf);
3746 }
3747 
3748 #ifdef _LP64
3749 #define XSTATE_BV 0x200
3750 #endif




3711   // Test below is ordered based on the relative positions of
3712   // the Java heap and the VTBuffer to execute a single test for heap-allocated values
3713 
3714   if (VTBuffer::base() < Universe::heap()->base()) {
3715     lea(temp_reg, VTBuffer_end);
3716     cmpptr(value, temp_reg);
3717     jcc(Assembler::greaterEqual, not_buffered);
3718     lea(temp_reg, VTBuffer_top);
3719     cmpptr(value, temp_reg);
3720     jcc(Assembler::less, not_buffered);
3721   } else {
3722     lea(temp_reg, VTBuffer_top);
3723     cmpptr(value, temp_reg);
3724     jcc(Assembler::less, not_buffered);
3725     lea(temp_reg, VTBuffer_end);
3726     cmpptr(value, temp_reg);
3727     jcc(Assembler::greaterEqual, not_buffered);
3728   }
3729 }
3730 
3731 void MacroAssembler::test_oop_is_not_value(Register oop, Register temp, Label& is_not_value) {
3732   const int mask = Universe::oop_metadata_valuetype_mask();
3733 #ifdef _LP64
3734   if (UseCompressedClassPointers) {
3735     movl(temp, Address(oop, oopDesc::klass_offset_in_bytes()));
3736   } else
3737 #endif
3738   movptr(temp, Address(oop, oopDesc::klass_offset_in_bytes()));
3739 
3740   andl(temp, mask);
3741   testl(temp, temp);
3742   jcc(Assembler::zero, is_not_value);
3743 }
3744 
3745 void MacroAssembler::os_breakpoint() {
3746   // instead of directly emitting a breakpoint, call os:breakpoint for better debugability
3747   // (e.g., MSVC can't call ps() otherwise)
3748   call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
3749 }
3750 
3751 void MacroAssembler::unimplemented(const char* what) {
3752   const char* buf = NULL;
3753   {
3754     ResourceMark rm;
3755     stringStream ss;
3756     ss.print("unimplemented: %s", what);
3757     buf = code_string(ss.as_string());
3758   }
3759   stop(buf);
3760 }
3761 
3762 #ifdef _LP64
3763 #define XSTATE_BV 0x200
3764 #endif


< prev index next >