comparison src/cpu/x86/vm/assembler_x86.hpp @ 644:c517646eef23

6813212: factor duplicated assembly code for general subclass check (for 6655638) Summary: Code in interp_masm, stubGenerator, c1_LIRAssembler, and AD files moved into MacroAssembler. Reviewed-by: kvn
author jrose
date Fri, 13 Mar 2009 18:39:22 -0700
parents c771b7f43bbf
children c89f86385056
comparison
equal deleted inserted replaced
643:c771b7f43bbf 644:c517646eef23
1805 RegisterConstant itable_index, 1805 RegisterConstant itable_index,
1806 Register method_result, 1806 Register method_result,
1807 Register scan_temp, 1807 Register scan_temp,
1808 Label& no_such_interface); 1808 Label& no_such_interface);
1809 1809
1810 // Test sub_klass against super_klass, with fast and slow paths.
1811
1812 // The fast path produces a tri-state answer: yes / no / maybe-slow.
1813 // One of the three labels can be NULL, meaning take the fall-through.
1814 // If super_check_offset is -1, the value is loaded up from super_klass.
1815 // No registers are killed, except temp_reg.
1816 void check_klass_subtype_fast_path(Register sub_klass,
1817 Register super_klass,
1818 Register temp_reg,
1819 Label* L_success,
1820 Label* L_failure,
1821 Label* L_slow_path,
1822 RegisterConstant super_check_offset = RegisterConstant(-1));
1823
1824 // The rest of the type check; must be wired to a corresponding fast path.
1825 // It does not repeat the fast path logic, so don't use it standalone.
1826 // The temp_reg and temp2_reg can be noreg, if no temps are available.
1827 // Updates the sub's secondary super cache as necessary.
1828 // If set_cond_codes, condition codes will be Z on success, NZ on failure.
1829 void check_klass_subtype_slow_path(Register sub_klass,
1830 Register super_klass,
1831 Register temp_reg,
1832 Register temp2_reg,
1833 Label* L_success,
1834 Label* L_failure,
1835 bool set_cond_codes = false);
1836
1837 // Simplified, combined version, good for typical uses.
1838 // Falls through on failure.
1839 void check_klass_subtype(Register sub_klass,
1840 Register super_klass,
1841 Register temp_reg,
1842 Label& L_success);
1843
1810 //---- 1844 //----
1811 void set_word_if_not_zero(Register reg); // sets reg to 1 if not zero, otherwise 0 1845 void set_word_if_not_zero(Register reg); // sets reg to 1 if not zero, otherwise 0
1812 1846
1813 // Debugging 1847 // Debugging
1814 1848