comparison src/cpu/x86/vm/stubGenerator_x86_32.cpp @ 10408:836a62f43af9

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 19 Jun 2013 10:45:56 +0200
parents b9a918201d47 3f281b313240
children 40b8c383bc31
comparison
equal deleted inserted replaced
10086:e0fb8a213650 10408:836a62f43af9
1496 // element stored and make a quick oop equality check on it.) 1496 // element stored and make a quick oop equality check on it.)
1497 1497
1498 __ movptr(elem_klass, elem_klass_addr); // query the object klass 1498 __ movptr(elem_klass, elem_klass_addr); // query the object klass
1499 generate_type_check(elem_klass, ckoff_arg, ckval_arg, temp, 1499 generate_type_check(elem_klass, ckoff_arg, ckval_arg, temp,
1500 &L_store_element, NULL); 1500 &L_store_element, NULL);
1501 // (On fall-through, we have failed the element type check.) 1501 // (On fall-through, we have failed the element type check.)
1502 // ======== end loop ======== 1502 // ======== end loop ========
1503 1503
1504 // It was a real error; we must depend on the caller to finish the job. 1504 // It was a real error; we must depend on the caller to finish the job.
1505 // Register "count" = -1 * number of *remaining* oops, length_arg = *total* oops. 1505 // Register "count" = -1 * number of *remaining* oops, length_arg = *total* oops.
1506 // Emit GC store barriers for the oops we have copied (length_arg + count), 1506 // Emit GC store barriers for the oops we have copied (length_arg + count),
1507 // and report their number to the caller. 1507 // and report their number to the caller.
1508 assert_different_registers(to, count, rax);
1509 Label L_post_barrier;
1508 __ addl(count, length_arg); // transfers = (length - remaining) 1510 __ addl(count, length_arg); // transfers = (length - remaining)
1509 __ movl2ptr(rax, count); // save the value 1511 __ movl2ptr(rax, count); // save the value
1510 __ notptr(rax); // report (-1^K) to caller 1512 __ notptr(rax); // report (-1^K) to caller (does not affect flags)
1511 __ movptr(to, to_arg); // reload 1513 __ jccb(Assembler::notZero, L_post_barrier);
1512 assert_different_registers(to, count, rax); 1514 __ jmp(L_done); // K == 0, nothing was copied, skip post barrier
1513 gen_write_ref_array_post_barrier(to, count);
1514 __ jmpb(L_done);
1515 1515
1516 // Come here on success only. 1516 // Come here on success only.
1517 __ BIND(L_do_card_marks); 1517 __ BIND(L_do_card_marks);
1518 __ xorptr(rax, rax); // return 0 on success
1518 __ movl2ptr(count, length_arg); 1519 __ movl2ptr(count, length_arg);
1519 __ movptr(to, to_arg); // reload 1520
1521 __ BIND(L_post_barrier);
1522 __ movptr(to, to_arg); // reload
1520 gen_write_ref_array_post_barrier(to, count); 1523 gen_write_ref_array_post_barrier(to, count);
1521 __ xorptr(rax, rax); // return 0 on success
1522 1524
1523 // Common exit point (success or failure). 1525 // Common exit point (success or failure).
1524 __ BIND(L_done); 1526 __ BIND(L_done);
1525 __ pop(rbx); 1527 __ pop(rbx);
1526 __ pop(rdi); 1528 __ pop(rdi);