< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page




3681   andl(temp_reg, 0x1);
3682   testl(temp_reg, temp_reg);
3683   jcc(Assembler::notZero, is_flattened);
3684 }
3685 
3686 void MacroAssembler::test_flat_array_klass(Register klass, Register temp_reg,
3687                                            Label& is_flat_array) {
3688   movl(temp_reg, Address(klass, Klass::layout_helper_offset()));
3689   sarl(temp_reg, Klass::_lh_array_tag_shift);
3690   cmpl(temp_reg, Klass::_lh_array_tag_vt_value);
3691   jcc(Assembler::equal, is_flat_array);
3692 }
3693 
3694 
3695 void MacroAssembler::test_flat_array_oop(Register oop, Register temp_reg,
3696                                          Label& is_flat_array) {
3697   load_klass(temp_reg, oop);
3698   test_flat_array_klass(temp_reg, temp_reg, is_flat_array);
3699 }
3700 
3701 void MacroAssembler::test_value_is_not_buffered(Register value, Register temp_reg, Label& not_buffered) {
3702   ExternalAddress VTBuffer_top(VTBuffer::top_addr());
3703   ExternalAddress VTBuffer_end(VTBuffer::end_addr());
3704 
3705   // Test below is ordered based on the relative positions of
3706   // the Java heap and the VTBuffer to execute a single test for heap-allocated values
3707 
3708   if (VTBuffer::base() < Universe::heap()->base()) {
3709     lea(temp_reg, VTBuffer_end);
3710     cmpptr(value, temp_reg);
3711     jcc(Assembler::greaterEqual, not_buffered);
3712     lea(temp_reg, VTBuffer_top);
3713     cmpptr(value, temp_reg);
3714     jcc(Assembler::less, not_buffered);
3715   } else {
3716     lea(temp_reg, VTBuffer_top);
3717     cmpptr(value, temp_reg);
3718     jcc(Assembler::less, not_buffered);
3719     lea(temp_reg, VTBuffer_end);
3720     cmpptr(value, temp_reg);
3721     jcc(Assembler::greaterEqual, not_buffered);
3722   }
3723 }
3724 
3725 void MacroAssembler::os_breakpoint() {
3726   // instead of directly emitting a breakpoint, call os:breakpoint for better debugability
3727   // (e.g., MSVC can't call ps() otherwise)
3728   call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
3729 }
3730 
3731 void MacroAssembler::unimplemented(const char* what) {
3732   const char* buf = NULL;
3733   {
3734     ResourceMark rm;
3735     stringStream ss;
3736     ss.print("unimplemented: %s", what);
3737     buf = code_string(ss.as_string());
3738   }
3739   stop(buf);
3740 }
3741 
3742 #ifdef _LP64
3743 #define XSTATE_BV 0x200
3744 #endif




3681   andl(temp_reg, 0x1);
3682   testl(temp_reg, temp_reg);
3683   jcc(Assembler::notZero, is_flattened);
3684 }
3685 
3686 void MacroAssembler::test_flat_array_klass(Register klass, Register temp_reg,
3687                                            Label& is_flat_array) {
3688   movl(temp_reg, Address(klass, Klass::layout_helper_offset()));
3689   sarl(temp_reg, Klass::_lh_array_tag_shift);
3690   cmpl(temp_reg, Klass::_lh_array_tag_vt_value);
3691   jcc(Assembler::equal, is_flat_array);
3692 }
3693 
3694 
3695 void MacroAssembler::test_flat_array_oop(Register oop, Register temp_reg,
3696                                          Label& is_flat_array) {
3697   load_klass(temp_reg, oop);
3698   test_flat_array_klass(temp_reg, temp_reg, is_flat_array);
3699 }
3700 
























3701 void MacroAssembler::os_breakpoint() {
3702   // instead of directly emitting a breakpoint, call os:breakpoint for better debugability
3703   // (e.g., MSVC can't call ps() otherwise)
3704   call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
3705 }
3706 
3707 void MacroAssembler::unimplemented(const char* what) {
3708   const char* buf = NULL;
3709   {
3710     ResourceMark rm;
3711     stringStream ss;
3712     ss.print("unimplemented: %s", what);
3713     buf = code_string(ss.as_string());
3714   }
3715   stop(buf);
3716 }
3717 
3718 #ifdef _LP64
3719 #define XSTATE_BV 0x200
3720 #endif


< prev index next >