Sync in generate_disjoint_long_oop_copy and refine it.

Mon, 26 Sep 2016 13:58:44 +0800

author
fujie
date
Mon, 26 Sep 2016 13:58:44 +0800
changeset 111
277a4b14f009
parent 110
3ea2bda83fb6
child 112
a55519e3b29f

Sync in generate_disjoint_long_oop_copy and refine it.

src/cpu/mips/vm/stubGenerator_mips_64.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/mips/vm/stubGenerator_mips_64.cpp	Mon Sep 26 13:44:12 2016 +0800
     1.2 +++ b/src/cpu/mips/vm/stubGenerator_mips_64.cpp	Mon Sep 26 13:58:44 2016 +0800
     1.3 @@ -1344,70 +1344,49 @@
     1.4    //   used by generate_conjoint_int_oop_copy().
     1.5    //
     1.6    address generate_disjoint_long_oop_copy(bool aligned, bool is_oop, const char *name) {
     1.7 -		Label l_2, l_3, l_4, l_stchk;
     1.8 +		Label l_3, l_4;
     1.9  		StubCodeMark mark(this, "StubRoutines", name);
    1.10  		__ align(CodeEntryAlignment);
    1.11  		address start = __ pc();
    1.12 +
    1.13  		__ push(T3);	
    1.14  		__ push(T0);	
    1.15  		__ push(T1);	
    1.16  		__ push(T8);	
    1.17 +
    1.18  		__ move(T1, A2);  
    1.19  		__ move(T3, A0); 
    1.20  		__ move(T0, A1);
    1.21 +                // T3: source array address
    1.22 +                // T0: destination array address
    1.23 +                // T1: element count
    1.24  
    1.25 -		// __ cmpl(ecx, 32);
    1.26 -		// __ jcc(Assembler::belowEqual, l_2);                   // <= 32 dwords
    1.27 -		// __ rep_movl();
    1.28 -		__ b(l_2); 	
    1.29 -		__ delayed()->nop();	
    1.30  		if (is_oop) {
    1.31 -		//  __ jmp(l_stchk);
    1.32 -			__ b(l_stchk); 
    1.33 -			__ delayed()->nop(); 
    1.34 +                        __ sync();
    1.35  		}
    1.36 -		//    __ popl(edi);
    1.37 -		//   __ popl(esi);
    1.38 -		//  __ ret(0);
    1.39 -		__ pop(T8);	
    1.40 -		__ pop(T1);	
    1.41 -		__ pop(T0);	
    1.42 -		__ pop(T3);	
    1.43 -		__ jr(RA); 
    1.44 +
    1.45 +		__ beq(T1, R0, l_4);  
    1.46  		__ delayed()->nop(); 
    1.47  
    1.48 -		__ bind(l_2);
    1.49 -		//  __ subl(edi, esi);
    1.50 -		//  __ testl(ecx, ecx);
    1.51 -		// __ jcc(Assembler::zero, l_4);
    1.52 -		__ beq(T1, R0, l_4);  
    1.53 -		__ delayed()->nop(); 
    1.54  		__ align(16);
    1.55  		__ bind(l_3);
    1.56 -		//__ movl(edx, Address(esi));
    1.57  		__ ld(AT, T3, 0);   
    1.58 -		// __ movl(Address(edi, esi, Address::times_1), edx);
    1.59  		__ sd(AT, T0, 0); 
    1.60 -		// __ addl(esi, 4);
    1.61  		__ addi(T3, T3, 8);
    1.62  		__ addi(T0, T0, 8);
    1.63 -		//   __ decl(ecx);
    1.64  		__ addi(T1, T1, -1); 
    1.65 -		//    __ jcc(Assembler::notEqual, l_3);
    1.66  		__ bne(T1, R0, l_3); 
    1.67  		__ delayed()->nop(); 
    1.68 +
    1.69  		if (is_oop) {
    1.70 -			__ bind(l_stchk);
    1.71 -			//      __ movl(edi, Address(esp, 8+ 8));
    1.72 -			//     __ movl(ecx, Address(esp, 8+ 12));
    1.73  			__ move(T0, A1); 
    1.74  			__ move(T1, A2); 
    1.75  			array_store_check();
    1.76 +                        __ sync();
    1.77  		}
    1.78 +
    1.79 +                // exit
    1.80  		__ bind(l_4);
    1.81 -		//    __ popl(edi);
    1.82 -		//   __ popl(esi);
    1.83 -		//  __ ret(0);
    1.84  		__ pop(T8);
    1.85  		__ pop(T1);
    1.86  		__ pop(T0);

mercurial