src/cpu/x86/vm/stubGenerator_x86_32.cpp

changeset 454
a73cc31728fe
parent 451
f8236e79048a
child 684
910a4cb98e9e
child 777
37f87013dfd8
equal deleted inserted replaced
453:c7d713375c94 454:a73cc31728fe
1414 &L_store_element, NULL); 1414 &L_store_element, NULL);
1415 // (On fall-through, we have failed the element type check.) 1415 // (On fall-through, we have failed the element type check.)
1416 // ======== end loop ======== 1416 // ======== end loop ========
1417 1417
1418 // It was a real error; we must depend on the caller to finish the job. 1418 // It was a real error; we must depend on the caller to finish the job.
1419 // Register rdx = -1 * number of *remaining* oops, r14 = *total* oops. 1419 // Register "count" = -1 * number of *remaining* oops, length_arg = *total* oops.
1420 // Emit GC store barriers for the oops we have copied (r14 + rdx), 1420 // Emit GC store barriers for the oops we have copied (length_arg + count),
1421 // and report their number to the caller. 1421 // and report their number to the caller.
1422 __ addl(count, length_arg); // transfers = (length - remaining) 1422 __ addl(count, length_arg); // transfers = (length - remaining)
1423 __ movl(rax, count); // save the value 1423 __ movl(rax, count); // save the value
1424 __ notl(rax); // report (-1^K) to caller 1424 __ notl(rax); // report (-1^K) to caller
1425 __ movl(to, to_arg); // reload 1425 __ movl(to, to_arg); // reload
1428 __ jmpb(L_done); 1428 __ jmpb(L_done);
1429 1429
1430 // Come here on success only. 1430 // Come here on success only.
1431 __ BIND(L_do_card_marks); 1431 __ BIND(L_do_card_marks);
1432 __ movl(count, length_arg); 1432 __ movl(count, length_arg);
1433 __ movl(to, to_arg); // reload
1433 gen_write_ref_array_post_barrier(to, count); 1434 gen_write_ref_array_post_barrier(to, count);
1434 __ xorl(rax, rax); // return 0 on success 1435 __ xorl(rax, rax); // return 0 on success
1435 1436
1436 // Common exit point (success or failure). 1437 // Common exit point (success or failure).
1437 __ BIND(L_done); 1438 __ BIND(L_done);

mercurial