1596 __ movptr(k_RInfo, Address(array, oopDesc::klass_offset_in_bytes())); |
1596 __ movptr(k_RInfo, Address(array, oopDesc::klass_offset_in_bytes())); |
1597 __ movptr(klass_RInfo, Address(value, oopDesc::klass_offset_in_bytes())); |
1597 __ movptr(klass_RInfo, Address(value, oopDesc::klass_offset_in_bytes())); |
1598 |
1598 |
1599 // get instance klass |
1599 // get instance klass |
1600 __ movptr(k_RInfo, Address(k_RInfo, objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc))); |
1600 __ movptr(k_RInfo, Address(k_RInfo, objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc))); |
1601 // get super_check_offset |
1601 // perform the fast part of the checking logic |
1602 __ movl(Rtmp1, Address(k_RInfo, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes())); |
1602 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, &done, stub->entry(), NULL); |
1603 // See if we get an immediate positive hit |
1603 // call out-of-line instance of __ check_klass_subtype_slow_path(...): |
1604 __ cmpptr(k_RInfo, Address(klass_RInfo, Rtmp1, Address::times_1)); |
|
1605 __ jcc(Assembler::equal, done); |
|
1606 // check for immediate negative hit |
|
1607 __ cmpl(Rtmp1, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes()); |
|
1608 __ jcc(Assembler::notEqual, *stub->entry()); |
|
1609 // check for self |
|
1610 __ cmpptr(klass_RInfo, k_RInfo); |
|
1611 __ jcc(Assembler::equal, done); |
|
1612 |
|
1613 __ push(klass_RInfo); |
1604 __ push(klass_RInfo); |
1614 __ push(k_RInfo); |
1605 __ push(k_RInfo); |
1615 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1606 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1616 __ pop(klass_RInfo); |
1607 __ pop(klass_RInfo); |
1617 __ pop(k_RInfo); |
1608 __ pop(k_RInfo); |
1733 __ cmpl(klass_RInfo, 0); |
1724 __ cmpl(klass_RInfo, 0); |
1734 __ jcc(Assembler::equal, *stub->entry()); |
1725 __ jcc(Assembler::equal, *stub->entry()); |
1735 } |
1726 } |
1736 __ bind(done); |
1727 __ bind(done); |
1737 } else { |
1728 } else { |
1738 __ movl(Rtmp1, Address(k_RInfo, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes())); |
1729 // perform the fast part of the checking logic |
1739 // See if we get an immediate positive hit |
1730 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, &done, stub->entry(), NULL); |
1740 __ cmpptr(k_RInfo, Address(klass_RInfo, Rtmp1, Address::times_1)); |
1731 // call out-of-line instance of __ check_klass_subtype_slow_path(...): |
1741 __ jcc(Assembler::equal, done); |
|
1742 // check for immediate negative hit |
|
1743 __ cmpl(Rtmp1, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes()); |
|
1744 __ jcc(Assembler::notEqual, *stub->entry()); |
|
1745 // check for self |
|
1746 __ cmpptr(klass_RInfo, k_RInfo); |
|
1747 __ jcc(Assembler::equal, done); |
|
1748 |
|
1749 __ push(klass_RInfo); |
1732 __ push(klass_RInfo); |
1750 __ push(k_RInfo); |
1733 __ push(k_RInfo); |
1751 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1734 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1752 __ pop(klass_RInfo); |
1735 __ pop(klass_RInfo); |
1753 __ pop(k_RInfo); |
1736 __ pop(k_RInfo); |
1819 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1802 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1820 __ pop(klass_RInfo); |
1803 __ pop(klass_RInfo); |
1821 __ pop(dst); |
1804 __ pop(dst); |
1822 __ jmp(done); |
1805 __ jmp(done); |
1823 } |
1806 } |
1824 } else { |
1807 } |
1825 #else |
1808 else // next block is unconditional if LP64: |
1826 { // YUCK |
|
1827 #endif // LP64 |
1809 #endif // LP64 |
|
1810 { |
1828 assert(dst != klass_RInfo && dst != k_RInfo, "need 3 registers"); |
1811 assert(dst != klass_RInfo && dst != k_RInfo, "need 3 registers"); |
1829 |
1812 |
1830 __ movl(dst, Address(k_RInfo, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes())); |
1813 // perform the fast part of the checking logic |
1831 // See if we get an immediate positive hit |
1814 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, dst, &one, &zero, NULL); |
1832 __ cmpptr(k_RInfo, Address(klass_RInfo, dst, Address::times_1)); |
1815 // call out-of-line instance of __ check_klass_subtype_slow_path(...): |
1833 __ jcc(Assembler::equal, one); |
|
1834 // check for immediate negative hit |
|
1835 __ cmpl(dst, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes()); |
|
1836 __ jcc(Assembler::notEqual, zero); |
|
1837 // check for self |
|
1838 __ cmpptr(klass_RInfo, k_RInfo); |
|
1839 __ jcc(Assembler::equal, one); |
|
1840 |
|
1841 __ push(klass_RInfo); |
1816 __ push(klass_RInfo); |
1842 __ push(k_RInfo); |
1817 __ push(k_RInfo); |
1843 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1818 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); |
1844 __ pop(klass_RInfo); |
1819 __ pop(klass_RInfo); |
1845 __ pop(dst); |
1820 __ pop(dst); |