src/cpu/sparc/vm/c1_Runtime1_sparc.cpp

changeset 1079
c517646eef23
parent 777
37f87013dfd8
child 1162
6b2273dd6fa9
equal deleted inserted replaced
1078:c771b7f43bbf 1079:c517646eef23
712 // 712 //
713 // ret : G3 713 // ret : G3
714 // sub : G3, argument, destroyed 714 // sub : G3, argument, destroyed
715 // super: G1, argument, not changed 715 // super: G1, argument, not changed
716 // raddr: O7, blown by call 716 // raddr: O7, blown by call
717 Label loop, miss; 717 Label miss;
718 718
719 __ save_frame(0); // Blow no registers! 719 __ save_frame(0); // Blow no registers!
720 720
721 __ ld_ptr( G3, sizeof(oopDesc) + Klass::secondary_supers_offset_in_bytes(), L3 ); 721 __ check_klass_subtype_slow_path(G3, G1, L0, L1, L2, L4, NULL, &miss);
722 __ lduw(L3,arrayOopDesc::length_offset_in_bytes(),L0); // length in l0
723 __ add(L3,arrayOopDesc::base_offset_in_bytes(T_OBJECT),L1); // ptr into array
724 __ clr(L4); // Index
725 // Load a little early; will load 1 off the end of the array.
726 // Ok for now; revisit if we have other uses of this routine.
727 __ ld_ptr(L1,0,L2); // Will load a little early
728
729 // The scan loop
730 __ bind(loop);
731 __ add(L1,wordSize,L1); // Bump by OOP size
732 __ cmp(L4,L0);
733 __ br(Assembler::equal,false,Assembler::pn,miss);
734 __ delayed()->inc(L4); // Bump index
735 __ subcc(L2,G1,L3); // Check for match; zero in L3 for a hit
736 __ brx( Assembler::notEqual, false, Assembler::pt, loop );
737 __ delayed()->ld_ptr(L1,0,L2); // Will load a little early
738
739 // Got a hit; report success; set cache
740 __ st_ptr( G1, G3, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() );
741 722
742 __ mov(1, G3); 723 __ mov(1, G3);
743 __ ret(); // Result in G5 is ok; flags set 724 __ ret(); // Result in G5 is 'true'
744 __ delayed()->restore(); // free copy or add can go here 725 __ delayed()->restore(); // free copy or add can go here
745 726
746 __ bind(miss); 727 __ bind(miss);
747 __ mov(0, G3); 728 __ mov(0, G3);
748 __ ret(); // Result in G5 is ok; flags set 729 __ ret(); // Result in G5 is 'false'
749 __ delayed()->restore(); // free copy or add can go here 730 __ delayed()->restore(); // free copy or add can go here
750 } 731 }
751 732
752 case monitorenter_nofpu_id: 733 case monitorenter_nofpu_id:
753 case monitorenter_id: 734 case monitorenter_id:

mercurial