src/cpu/x86/vm/assembler_x86.cpp

changeset 2697
09f96c3ff1ad
parent 2686
b40d4fa697bf
child 2746
d86923d96dca
child 2784
92add02409c9
equal deleted inserted replaced
2696:9d343b8113db 2697:09f96c3ff1ad
7767 lea(rscratch1, src); 7767 lea(rscratch1, src);
7768 xorps(dst, Address(rscratch1, 0)); 7768 xorps(dst, Address(rscratch1, 0));
7769 } 7769 }
7770 } 7770 }
7771 7771
7772 void MacroAssembler::cmov32(Condition cc, Register dst, Address src) {
7773 if (VM_Version::supports_cmov()) {
7774 cmovl(cc, dst, src);
7775 } else {
7776 Label L;
7777 jccb(negate_condition(cc), L);
7778 movl(dst, src);
7779 bind(L);
7780 }
7781 }
7782
7783 void MacroAssembler::cmov32(Condition cc, Register dst, Register src) {
7784 if (VM_Version::supports_cmov()) {
7785 cmovl(cc, dst, src);
7786 } else {
7787 Label L;
7788 jccb(negate_condition(cc), L);
7789 movl(dst, src);
7790 bind(L);
7791 }
7792 }
7793
7772 void MacroAssembler::verify_oop(Register reg, const char* s) { 7794 void MacroAssembler::verify_oop(Register reg, const char* s) {
7773 if (!VerifyOops) return; 7795 if (!VerifyOops) return;
7774 7796
7775 // Pass register number to verify_oop_subroutine 7797 // Pass register number to verify_oop_subroutine
7776 char* b = new char[strlen(s) + 50]; 7798 char* b = new char[strlen(s) + 50];
9017 // difference of the string lengths (stack). 9039 // difference of the string lengths (stack).
9018 // Do the conditional move stuff 9040 // Do the conditional move stuff
9019 movl(result, cnt1); 9041 movl(result, cnt1);
9020 subl(cnt1, cnt2); 9042 subl(cnt1, cnt2);
9021 push(cnt1); 9043 push(cnt1);
9022 if (VM_Version::supports_cmov()) { 9044 cmov32(Assembler::lessEqual, cnt2, result);
9023 cmovl(Assembler::lessEqual, cnt2, result);
9024 } else {
9025 Label GT_LABEL;
9026 jccb(Assembler::greater, GT_LABEL);
9027 movl(cnt2, result);
9028 bind(GT_LABEL);
9029 }
9030 9045
9031 // Is the minimum length zero? 9046 // Is the minimum length zero?
9032 testl(cnt2, cnt2); 9047 testl(cnt2, cnt2);
9033 jcc(Assembler::zero, LENGTH_DIFF_LABEL); 9048 jcc(Assembler::zero, LENGTH_DIFF_LABEL);
9034 9049

mercurial