src/cpu/sparc/vm/c1_Runtime1_sparc.cpp

changeset 1079
c517646eef23
parent 777
37f87013dfd8
child 1162
6b2273dd6fa9
     1.1 --- a/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Fri Mar 13 11:35:17 2009 -0700
     1.2 +++ b/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Fri Mar 13 18:39:22 2009 -0700
     1.3 @@ -714,38 +714,19 @@
     1.4          //      sub  : G3, argument, destroyed
     1.5          //      super: G1, argument, not changed
     1.6          //      raddr: O7, blown by call
     1.7 -        Label loop, miss;
     1.8 +        Label miss;
     1.9  
    1.10          __ save_frame(0);               // Blow no registers!
    1.11  
    1.12 -        __ ld_ptr( G3, sizeof(oopDesc) + Klass::secondary_supers_offset_in_bytes(), L3 );
    1.13 -        __ lduw(L3,arrayOopDesc::length_offset_in_bytes(),L0); // length in l0
    1.14 -        __ add(L3,arrayOopDesc::base_offset_in_bytes(T_OBJECT),L1); // ptr into array
    1.15 -        __ clr(L4);                     // Index
    1.16 -        // Load a little early; will load 1 off the end of the array.
    1.17 -        // Ok for now; revisit if we have other uses of this routine.
    1.18 -        __ ld_ptr(L1,0,L2);             // Will load a little early
    1.19 -
    1.20 -        // The scan loop
    1.21 -        __ bind(loop);
    1.22 -        __ add(L1,wordSize,L1); // Bump by OOP size
    1.23 -        __ cmp(L4,L0);
    1.24 -        __ br(Assembler::equal,false,Assembler::pn,miss);
    1.25 -        __ delayed()->inc(L4);  // Bump index
    1.26 -        __ subcc(L2,G1,L3);             // Check for match; zero in L3 for a hit
    1.27 -        __ brx( Assembler::notEqual, false, Assembler::pt, loop );
    1.28 -        __ delayed()->ld_ptr(L1,0,L2); // Will load a little early
    1.29 -
    1.30 -        // Got a hit; report success; set cache
    1.31 -        __ st_ptr( G1, G3, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() );
    1.32 +        __ check_klass_subtype_slow_path(G3, G1, L0, L1, L2, L4, NULL, &miss);
    1.33  
    1.34          __ mov(1, G3);
    1.35 -        __ ret();                       // Result in G5 is ok; flags set
    1.36 +        __ ret();                       // Result in G5 is 'true'
    1.37          __ delayed()->restore();        // free copy or add can go here
    1.38  
    1.39          __ bind(miss);
    1.40          __ mov(0, G3);
    1.41 -        __ ret();                       // Result in G5 is ok; flags set
    1.42 +        __ ret();                       // Result in G5 is 'false'
    1.43          __ delayed()->restore();        // free copy or add can go here
    1.44        }
    1.45  

mercurial