src/cpu/x86/vm/stubGenerator_x86_32.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/x86/vm/stubGenerator_x86_32.cpp Mon May 20 14:34:06 2013
--- new/src/cpu/x86/vm/stubGenerator_x86_32.cpp Mon May 20 14:34:06 2013
*** 1503,1526 ****
--- 1503,1528 ----
// It was a real error; we must depend on the caller to finish the job.
// Register "count" = -1 * number of *remaining* oops, length_arg = *total* oops.
// Emit GC store barriers for the oops we have copied (length_arg + count),
// and report their number to the caller.
+ assert_different_registers(to, count, rax);
+ Label L_post_barrier;
__ addl(count, length_arg); // transfers = (length - remaining)
__ movl2ptr(rax, count); // save the value
! __ notptr(rax); // report (-1^K) to caller (does not affect flags)
__ movptr(to, to_arg); // reload
assert_different_registers(to, count, rax);
gen_write_ref_array_post_barrier(to, count);
__ jmpb(L_done);
+ __ jccb(Assembler::notZero, L_post_barrier);
+ __ jmp(L_done); // K == 0, nothing was copied, skip post barrier
// Come here on success only.
__ BIND(L_do_card_marks);
+ __ xorptr(rax, rax); // return 0 on success
__ movl2ptr(count, length_arg);
+
+ __ BIND(L_post_barrier);
__ movptr(to, to_arg); // reload
gen_write_ref_array_post_barrier(to, count);
__ xorptr(rax, rax); // return 0 on success
// Common exit point (success or failure).
__ BIND(L_done);
__ pop(rbx);
__ pop(rdi);
src/cpu/x86/vm/stubGenerator_x86_32.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File