comparison src/cpu/sparc/vm/assembler_sparc.hpp @ 623:9adddb8c0fc8

6812831: factor duplicated assembly code for megamorphic invokeinterface (for 6655638) Summary: Code in vtableStubs and templateTable moved into MacroAssembler. Reviewed-by: kvn
author jrose
date Fri, 06 Mar 2009 21:36:50 -0800
parents 56aae7be60d4
children c517646eef23
comparison
equal deleted inserted replaced
622:56aae7be60d4 623:9adddb8c0fc8
1857 } 1857 }
1858 1858
1859 // Functions for isolating 64 bit shifts for LP64 1859 // Functions for isolating 64 bit shifts for LP64
1860 inline void sll_ptr( Register s1, Register s2, Register d ); 1860 inline void sll_ptr( Register s1, Register s2, Register d );
1861 inline void sll_ptr( Register s1, int imm6a, Register d ); 1861 inline void sll_ptr( Register s1, int imm6a, Register d );
1862 inline void sll_ptr( Register s1, RegisterConstant s2, Register d );
1862 inline void srl_ptr( Register s1, Register s2, Register d ); 1863 inline void srl_ptr( Register s1, Register s2, Register d );
1863 inline void srl_ptr( Register s1, int imm6a, Register d ); 1864 inline void srl_ptr( Register s1, int imm6a, Register d );
1864 1865
1865 // little-endian 1866 // little-endian
1866 inline void casl( Register s1, Register s2, Register d) { casa( s1, s2, d, ASI_PRIMARY_LITTLE); } 1867 inline void casl( Register s1, Register s2, Register d) { casa( s1, s2, d, ASI_PRIMARY_LITTLE); }
1983 inline void st_long( Register d, const Address& a, int offset = 0 ); 1984 inline void st_long( Register d, const Address& a, int offset = 0 );
1984 1985
1985 // Loading values by size and signed-ness 1986 // Loading values by size and signed-ness
1986 void load_sized_value(Register s1, RegisterConstant s2, Register d, 1987 void load_sized_value(Register s1, RegisterConstant s2, Register d,
1987 int size_in_bytes, bool is_signed); 1988 int size_in_bytes, bool is_signed);
1989
1990 // Helpers for address formation.
1991 // They update the dest in place, whether it is a register or constant.
1992 // They emit no code at all if src is a constant zero.
1993 // If dest is a constant and src is a register, the temp argument
1994 // is required, and becomes the result.
1995 // If dest is a register and src is a non-simm13 constant,
1996 // the temp argument is required, and is used to materialize the constant.
1997 void regcon_inc_ptr( RegisterConstant& dest, RegisterConstant src,
1998 Register temp = noreg );
1999 void regcon_sll_ptr( RegisterConstant& dest, RegisterConstant src,
2000 Register temp = noreg );
2001 RegisterConstant ensure_rs2(RegisterConstant rs2, Register sethi_temp) {
2002 guarantee(sethi_temp != noreg, "constant offset overflow");
2003 if (is_simm13(rs2.constant_or_zero()))
2004 return rs2; // register or short constant
2005 set(rs2.as_constant(), sethi_temp);
2006 return sethi_temp;
2007 }
1988 2008
1989 // -------------------------------------------------- 2009 // --------------------------------------------------
1990 2010
1991 public: 2011 public:
1992 // traps as per trap.h (SPARC ABI?) 2012 // traps as per trap.h (SPARC ABI?)
2297 Register t1, // temp register 2317 Register t1, // temp register
2298 Label& slow_case // continuation point if fast allocation fails 2318 Label& slow_case // continuation point if fast allocation fails
2299 ); 2319 );
2300 void tlab_refill(Label& retry_tlab, Label& try_eden, Label& slow_case); 2320 void tlab_refill(Label& retry_tlab, Label& try_eden, Label& slow_case);
2301 2321
2322 // interface method calling
2323 void lookup_interface_method(Register recv_klass,
2324 Register intf_klass,
2325 RegisterConstant itable_index,
2326 Register method_result,
2327 Register temp_reg, Register temp2_reg,
2328 Label& no_such_interface);
2329
2302 // Stack overflow checking 2330 // Stack overflow checking
2303 2331
2304 // Note: this clobbers G3_scratch 2332 // Note: this clobbers G3_scratch
2305 void bang_stack_with_offset(int offset) { 2333 void bang_stack_with_offset(int offset) {
2306 // stack grows down, caller passes positive offset 2334 // stack grows down, caller passes positive offset