1.1 --- a/src/cpu/x86/vm/stubGenerator_x86_32.cpp Fri Aug 20 09:55:50 2010 -0700 1.2 +++ b/src/cpu/x86/vm/stubGenerator_x86_32.cpp Fri Aug 27 17:33:49 2010 -0700 1.3 @@ -1039,6 +1039,33 @@ 1.4 } 1.5 1.6 1.7 + address generate_fill(BasicType t, bool aligned, const char *name) { 1.8 + __ align(CodeEntryAlignment); 1.9 + StubCodeMark mark(this, "StubRoutines", name); 1.10 + address start = __ pc(); 1.11 + 1.12 + BLOCK_COMMENT("Entry:"); 1.13 + 1.14 + const Register to = rdi; // source array address 1.15 + const Register value = rdx; // value 1.16 + const Register count = rsi; // elements count 1.17 + 1.18 + __ enter(); // required for proper stackwalking of RuntimeStub frame 1.19 + __ push(rsi); 1.20 + __ push(rdi); 1.21 + __ movptr(to , Address(rsp, 12+ 4)); 1.22 + __ movl(value, Address(rsp, 12+ 8)); 1.23 + __ movl(count, Address(rsp, 12+ 12)); 1.24 + 1.25 + __ generate_fill(t, aligned, to, value, count, rax, xmm0); 1.26 + 1.27 + __ pop(rdi); 1.28 + __ pop(rsi); 1.29 + __ leave(); // required for proper stackwalking of RuntimeStub frame 1.30 + __ ret(0); 1.31 + return start; 1.32 + } 1.33 + 1.34 address generate_conjoint_copy(BasicType t, bool aligned, 1.35 Address::ScaleFactor sf, 1.36 address nooverlap_target, 1.37 @@ -2001,6 +2028,13 @@ 1.38 generate_conjoint_long_copy(entry, &entry_jlong_arraycopy, 1.39 "jlong_arraycopy"); 1.40 1.41 + StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill"); 1.42 + StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill"); 1.43 + StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill"); 1.44 + StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill"); 1.45 + StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill"); 1.46 + StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill"); 1.47 + 1.48 StubRoutines::_arrayof_jint_disjoint_arraycopy = 1.49 StubRoutines::_jint_disjoint_arraycopy; 1.50 StubRoutines::_arrayof_oop_disjoint_arraycopy =