comparison src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @ 622:56aae7be60d4

6812678: macro assembler needs delayed binding of a few constants (for 6655638) Summary: minor assembler enhancements preparing for method handles Reviewed-by: kvn
author jrose
date Wed, 04 Mar 2009 09:58:39 -0800
parents db4caa99ef11
children 7bb995fbd3c0 c517646eef23
comparison
equal deleted inserted replaced
621:19f25e603e7b 622:56aae7be60d4
552 Label noLoop, haveResult; 552 Label noLoop, haveResult;
553 __ testptr (rax, rax); 553 __ testptr (rax, rax);
554 __ jcc (Assembler::zero, noLoop); 554 __ jcc (Assembler::zero, noLoop);
555 555
556 // compare first characters 556 // compare first characters
557 __ load_unsigned_word(rcx, Address(rdi, 0)); 557 __ load_unsigned_short(rcx, Address(rdi, 0));
558 __ load_unsigned_word(rbx, Address(rsi, 0)); 558 __ load_unsigned_short(rbx, Address(rsi, 0));
559 __ subl(rcx, rbx); 559 __ subl(rcx, rbx);
560 __ jcc(Assembler::notZero, haveResult); 560 __ jcc(Assembler::notZero, haveResult);
561 // starting loop 561 // starting loop
562 __ decrement(rax); // we already tested index: skip one 562 __ decrement(rax); // we already tested index: skip one
563 __ jcc(Assembler::zero, noLoop); 563 __ jcc(Assembler::zero, noLoop);
572 // compare the strings in a loop 572 // compare the strings in a loop
573 573
574 Label loop; 574 Label loop;
575 __ align(wordSize); 575 __ align(wordSize);
576 __ bind(loop); 576 __ bind(loop);
577 __ load_unsigned_word(rcx, Address(rdi, rax, Address::times_2, 0)); 577 __ load_unsigned_short(rcx, Address(rdi, rax, Address::times_2, 0));
578 __ load_unsigned_word(rbx, Address(rsi, rax, Address::times_2, 0)); 578 __ load_unsigned_short(rbx, Address(rsi, rax, Address::times_2, 0));
579 __ subl(rcx, rbx); 579 __ subl(rcx, rbx);
580 __ jcc(Assembler::notZero, haveResult); 580 __ jcc(Assembler::notZero, haveResult);
581 __ increment(rax); 581 __ increment(rax);
582 __ jcc(Assembler::notZero, loop); 582 __ jcc(Assembler::notZero, loop);
583 583