Lines 1931-1948
Link Here
|
1931 |
__ movl(temp, Address(array, h, Address::times_8, 0*wordSize)); |
1931 |
__ movl(temp, Address(array, h, Address::times_8, 0*wordSize)); |
1932 |
__ bswapl(temp); |
1932 |
__ bswapl(temp); |
1933 |
__ cmpl(key, temp); |
1933 |
__ cmpl(key, temp); |
1934 |
if (VM_Version::supports_cmov()) { |
1934 |
// j = h if (key < array[h].fast_match()) |
1935 |
__ cmovl(Assembler::less , j, h); // j = h if (key < array[h].fast_match()) |
1935 |
__ cmov32(Assembler::less , j, h); |
1936 |
__ cmovl(Assembler::greaterEqual, i, h); // i = h if (key >= array[h].fast_match()) |
1936 |
// i = h if (key >= array[h].fast_match()) |
1937 |
} else { |
1937 |
__ cmov32(Assembler::greaterEqual, i, h); |
1938 |
Label set_i, end_of_if; |
|
|
1939 |
__ jccb(Assembler::greaterEqual, set_i); // { |
1940 |
__ mov(j, h); // j = h; |
1941 |
__ jmp(end_of_if); // } |
1942 |
__ bind(set_i); // else { |
1943 |
__ mov(i, h); // i = h; |
1944 |
__ bind(end_of_if); // } |
1945 |
} |
1946 |
// while (i+1 < j) |
1938 |
// while (i+1 < j) |
1947 |
__ bind(entry); |
1939 |
__ bind(entry); |
1948 |
__ leal(h, Address(i, 1)); // i+1 |
1940 |
__ leal(h, Address(i, 1)); // i+1 |
Lines 3463-3484
Link Here
|
3463 |
|
3455 |
|
3464 |
// find a free slot in the monitor block (result in rdx) |
3456 |
// find a free slot in the monitor block (result in rdx) |
3465 |
{ Label entry, loop, exit; |
3457 |
{ Label entry, loop, exit; |
3466 |
__ movptr(rcx, monitor_block_top); // points to current entry, starting with top-most entry |
3458 |
__ movptr(rcx, monitor_block_top); // points to current entry, starting with top-most entry |
3467 |
__ lea(rbx, monitor_block_bot); // points to word before bottom of monitor block |
3459 |
|
|
|
3460 |
__ lea(rbx, monitor_block_bot); // points to word before bottom of monitor block |
3468 |
__ jmpb(entry); |
3461 |
__ jmpb(entry); |
3469 |
|
3462 |
|
3470 |
__ bind(loop); |
3463 |
__ bind(loop); |
3471 |
__ cmpptr(Address(rcx, BasicObjectLock::obj_offset_in_bytes()), (int32_t)NULL_WORD); // check if current entry is used |
3464 |
__ cmpptr(Address(rcx, BasicObjectLock::obj_offset_in_bytes()), (int32_t)NULL_WORD); // check if current entry is used |
3472 |
|
3465 |
__ cmovptr(Assembler::equal, rdx, rcx); // if not used then remember entry in rdx |
3473 |
// TODO - need new func here - kbt |
|
|
3474 |
if (VM_Version::supports_cmov()) { |
3475 |
__ cmov(Assembler::equal, rdx, rcx); // if not used then remember entry in rdx |
3476 |
} else { |
3477 |
Label L; |
3478 |
__ jccb(Assembler::notEqual, L); |
3479 |
__ mov(rdx, rcx); // if not used then remember entry in rdx |
3480 |
__ bind(L); |
3481 |
} |
3482 |
__ cmpptr(rax, Address(rcx, BasicObjectLock::obj_offset_in_bytes())); // check if current entry is for same object |
3466 |
__ cmpptr(rax, Address(rcx, BasicObjectLock::obj_offset_in_bytes())); // check if current entry is for same object |
3483 |
__ jccb(Assembler::equal, exit); // if same object then stop searching |
3467 |
__ jccb(Assembler::equal, exit); // if same object then stop searching |
3484 |
__ addptr(rcx, entry_size); // otherwise advance to next entry |
3468 |
__ addptr(rcx, entry_size); // otherwise advance to next entry |