equal
deleted
inserted
replaced
6102 generate_stack_overflow_check(stack_bang_size); |
6102 generate_stack_overflow_check(stack_bang_size); |
6103 |
6103 |
6104 // We always push rbp, so that on return to interpreter rbp, will be |
6104 // We always push rbp, so that on return to interpreter rbp, will be |
6105 // restored correctly and we can correct the stack. |
6105 // restored correctly and we can correct the stack. |
6106 push(rbp); |
6106 push(rbp); |
|
6107 // Save caller's stack pointer into RBP if the frame pointer is preserved. |
|
6108 if (PreserveFramePointer) { |
|
6109 mov(rbp, rsp); |
|
6110 } |
6107 // Remove word for ebp |
6111 // Remove word for ebp |
6108 framesize -= wordSize; |
6112 framesize -= wordSize; |
6109 |
6113 |
6110 // Create frame |
6114 // Create frame |
6111 if (framesize) { |
6115 if (framesize) { |
6116 subptr_imm32(rsp, framesize); |
6120 subptr_imm32(rsp, framesize); |
6117 |
6121 |
6118 // Save RBP register now. |
6122 // Save RBP register now. |
6119 framesize -= wordSize; |
6123 framesize -= wordSize; |
6120 movptr(Address(rsp, framesize), rbp); |
6124 movptr(Address(rsp, framesize), rbp); |
|
6125 // Save caller's stack pointer into RBP if the frame pointer is preserved. |
|
6126 if (PreserveFramePointer) { |
|
6127 movptr(rbp, rsp); |
|
6128 addptr(rbp, framesize + wordSize); |
|
6129 } |
6121 } |
6130 } |
6122 |
6131 |
6123 if (VerifyStackAtCalls) { // Majik cookie to verify stack depth |
6132 if (VerifyStackAtCalls) { // Majik cookie to verify stack depth |
6124 framesize -= wordSize; |
6133 framesize -= wordSize; |
6125 movptr(Address(rsp, framesize), (int32_t)0xbadb100d); |
6134 movptr(Address(rsp, framesize), (int32_t)0xbadb100d); |
6669 jccb(Assembler::notZero, VECTOR_NOT_EQUAL); |
6678 jccb(Assembler::notZero, VECTOR_NOT_EQUAL); |
6670 addptr(result, stride2); |
6679 addptr(result, stride2); |
6671 subl(cnt2, stride2); |
6680 subl(cnt2, stride2); |
6672 jccb(Assembler::notZero, COMPARE_WIDE_VECTORS_LOOP); |
6681 jccb(Assembler::notZero, COMPARE_WIDE_VECTORS_LOOP); |
6673 // clean upper bits of YMM registers |
6682 // clean upper bits of YMM registers |
6674 vzeroupper(); |
6683 vpxor(vec1, vec1); |
6675 |
6684 |
6676 // compare wide vectors tail |
6685 // compare wide vectors tail |
6677 bind(COMPARE_WIDE_TAIL); |
6686 bind(COMPARE_WIDE_TAIL); |
6678 testptr(result, result); |
6687 testptr(result, result); |
6679 jccb(Assembler::zero, LENGTH_DIFF_LABEL); |
6688 jccb(Assembler::zero, LENGTH_DIFF_LABEL); |
6684 jmpb(COMPARE_WIDE_VECTORS_LOOP); |
6693 jmpb(COMPARE_WIDE_VECTORS_LOOP); |
6685 |
6694 |
6686 // Identifies the mismatching (higher or lower)16-bytes in the 32-byte vectors. |
6695 // Identifies the mismatching (higher or lower)16-bytes in the 32-byte vectors. |
6687 bind(VECTOR_NOT_EQUAL); |
6696 bind(VECTOR_NOT_EQUAL); |
6688 // clean upper bits of YMM registers |
6697 // clean upper bits of YMM registers |
6689 vzeroupper(); |
6698 vpxor(vec1, vec1); |
6690 lea(str1, Address(str1, result, scale)); |
6699 lea(str1, Address(str1, result, scale)); |
6691 lea(str2, Address(str2, result, scale)); |
6700 lea(str2, Address(str2, result, scale)); |
6692 jmp(COMPARE_16_CHARS); |
6701 jmp(COMPARE_16_CHARS); |
6693 |
6702 |
6694 // Compare tail chars, length between 1 to 15 chars |
6703 // Compare tail chars, length between 1 to 15 chars |
6943 |
6952 |
6944 // That's it |
6953 // That's it |
6945 bind(DONE); |
6954 bind(DONE); |
6946 if (UseAVX >= 2) { |
6955 if (UseAVX >= 2) { |
6947 // clean upper bits of YMM registers |
6956 // clean upper bits of YMM registers |
6948 vzeroupper(); |
6957 vpxor(vec1, vec1); |
|
6958 vpxor(vec2, vec2); |
6949 } |
6959 } |
6950 } |
6960 } |
6951 |
6961 |
6952 void MacroAssembler::generate_fill(BasicType t, bool aligned, |
6962 void MacroAssembler::generate_fill(BasicType t, bool aligned, |
6953 Register to, Register value, Register count, |
6963 Register to, Register value, Register count, |
7077 addptr(to, 32); |
7087 addptr(to, 32); |
7078 subl(count, 8 << shift); |
7088 subl(count, 8 << shift); |
7079 |
7089 |
7080 BIND(L_check_fill_8_bytes); |
7090 BIND(L_check_fill_8_bytes); |
7081 // clean upper bits of YMM registers |
7091 // clean upper bits of YMM registers |
7082 vzeroupper(); |
7092 movdl(xtmp, value); |
|
7093 pshufd(xtmp, xtmp, 0); |
7083 } else { |
7094 } else { |
7084 // Fill 32-byte chunks |
7095 // Fill 32-byte chunks |
7085 pshufd(xtmp, xtmp, 0); |
7096 pshufd(xtmp, xtmp, 0); |
7086 |
7097 |
7087 subl(count, 8 << shift); |
7098 subl(count, 8 << shift); |
7240 jccb(Assembler::lessEqual, L_copy_16_chars); |
7251 jccb(Assembler::lessEqual, L_copy_16_chars); |
7241 |
7252 |
7242 bind(L_copy_16_chars_exit); |
7253 bind(L_copy_16_chars_exit); |
7243 if (UseAVX >= 2) { |
7254 if (UseAVX >= 2) { |
7244 // clean upper bits of YMM registers |
7255 // clean upper bits of YMM registers |
7245 vzeroupper(); |
7256 vpxor(tmp2Reg, tmp2Reg); |
|
7257 vpxor(tmp3Reg, tmp3Reg); |
|
7258 vpxor(tmp4Reg, tmp4Reg); |
|
7259 movdl(tmp1Reg, tmp5); |
|
7260 pshufd(tmp1Reg, tmp1Reg, 0); |
7246 } |
7261 } |
7247 subptr(len, 8); |
7262 subptr(len, 8); |
7248 jccb(Assembler::greater, L_copy_8_chars_exit); |
7263 jccb(Assembler::greater, L_copy_8_chars_exit); |
7249 |
7264 |
7250 bind(L_copy_8_chars); |
7265 bind(L_copy_8_chars); |