Mercurial > hg > truffle
comparison src/cpu/x86/vm/x86_64.ad @ 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 | 98cb887364d3 |
children | 337400e7a5dd |
comparison
equal
deleted
inserted
replaced
621:19f25e603e7b | 622:56aae7be60d4 |
---|---|
3763 masm.bind(RCX_GOOD_LABEL); | 3763 masm.bind(RCX_GOOD_LABEL); |
3764 masm.testl(rsi, rsi); | 3764 masm.testl(rsi, rsi); |
3765 masm.jcc(Assembler::zero, LENGTH_DIFF_LABEL); | 3765 masm.jcc(Assembler::zero, LENGTH_DIFF_LABEL); |
3766 | 3766 |
3767 // Load first characters | 3767 // Load first characters |
3768 masm.load_unsigned_word(rcx, Address(rbx, 0)); | 3768 masm.load_unsigned_short(rcx, Address(rbx, 0)); |
3769 masm.load_unsigned_word(rdi, Address(rax, 0)); | 3769 masm.load_unsigned_short(rdi, Address(rax, 0)); |
3770 | 3770 |
3771 // Compare first characters | 3771 // Compare first characters |
3772 masm.subl(rcx, rdi); | 3772 masm.subl(rcx, rdi); |
3773 masm.jcc(Assembler::notZero, POP_LABEL); | 3773 masm.jcc(Assembler::notZero, POP_LABEL); |
3774 masm.decrementl(rsi); | 3774 masm.decrementl(rsi); |
3794 masm.lea(rbx, Address(rbx, rsi, Address::times_2, 2)); | 3794 masm.lea(rbx, Address(rbx, rsi, Address::times_2, 2)); |
3795 masm.negptr(rsi); | 3795 masm.negptr(rsi); |
3796 | 3796 |
3797 // Compare the rest of the characters | 3797 // Compare the rest of the characters |
3798 masm.bind(WHILE_HEAD_LABEL); | 3798 masm.bind(WHILE_HEAD_LABEL); |
3799 masm.load_unsigned_word(rcx, Address(rbx, rsi, Address::times_2, 0)); | 3799 masm.load_unsigned_short(rcx, Address(rbx, rsi, Address::times_2, 0)); |
3800 masm.load_unsigned_word(rdi, Address(rax, rsi, Address::times_2, 0)); | 3800 masm.load_unsigned_short(rdi, Address(rax, rsi, Address::times_2, 0)); |
3801 masm.subl(rcx, rdi); | 3801 masm.subl(rcx, rdi); |
3802 masm.jcc(Assembler::notZero, POP_LABEL); | 3802 masm.jcc(Assembler::notZero, POP_LABEL); |
3803 masm.increment(rsi); | 3803 masm.increment(rsi); |
3804 masm.jcc(Assembler::notZero, WHILE_HEAD_LABEL); | 3804 masm.jcc(Assembler::notZero, WHILE_HEAD_LABEL); |
3805 | 3805 |
3852 masm.andl(tmp2Reg, 1); | 3852 masm.andl(tmp2Reg, 1); |
3853 masm.testl(tmp2Reg, tmp2Reg); | 3853 masm.testl(tmp2Reg, tmp2Reg); |
3854 masm.jcc(Assembler::zero, COMPARE_LOOP_HDR); | 3854 masm.jcc(Assembler::zero, COMPARE_LOOP_HDR); |
3855 | 3855 |
3856 // Compare 2-byte "tail" at end of arrays | 3856 // Compare 2-byte "tail" at end of arrays |
3857 masm.load_unsigned_word(tmp1Reg, Address(ary1Reg, resultReg, Address::times_4, base_offset)); | 3857 masm.load_unsigned_short(tmp1Reg, Address(ary1Reg, resultReg, Address::times_4, base_offset)); |
3858 masm.load_unsigned_word(tmp2Reg, Address(ary2Reg, resultReg, Address::times_4, base_offset)); | 3858 masm.load_unsigned_short(tmp2Reg, Address(ary2Reg, resultReg, Address::times_4, base_offset)); |
3859 masm.cmpl(tmp1Reg, tmp2Reg); | 3859 masm.cmpl(tmp1Reg, tmp2Reg); |
3860 masm.jcc(Assembler::notEqual, FALSE_LABEL); | 3860 masm.jcc(Assembler::notEqual, FALSE_LABEL); |
3861 masm.testl(resultReg, resultReg); | 3861 masm.testl(resultReg, resultReg); |
3862 masm.jcc(Assembler::zero, TRUE_LABEL); | 3862 masm.jcc(Assembler::zero, TRUE_LABEL); |
3863 | 3863 |