1.1 --- a/src/cpu/sparc/vm/assembler_sparc.hpp Tue Mar 03 18:25:57 2009 -0800 1.2 +++ b/src/cpu/sparc/vm/assembler_sparc.hpp Wed Mar 04 09:58:39 2009 -0800 1.3 @@ -384,6 +384,12 @@ 1.4 1.5 inline bool is_simm13(int offset = 0); // check disp+offset for overflow 1.6 1.7 + Address plus_disp(int disp) const { // bump disp by a small amount 1.8 + Address a = (*this); 1.9 + a._disp += disp; 1.10 + return a; 1.11 + } 1.12 + 1.13 Address split_disp() const { // deal with disp overflow 1.14 Address a = (*this); 1.15 int hi_disp = _disp & ~0x3ff; 1.16 @@ -1082,6 +1088,7 @@ 1.17 inline void add( Register s1, Register s2, Register d ); 1.18 inline void add( Register s1, int simm13a, Register d, relocInfo::relocType rtype = relocInfo::none); 1.19 inline void add( Register s1, int simm13a, Register d, RelocationHolder const& rspec); 1.20 + inline void add( Register s1, RegisterConstant s2, Register d, int offset = 0); 1.21 inline void add( const Address& a, Register d, int offset = 0); 1.22 1.23 void addcc( Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); } 1.24 @@ -1298,6 +1305,16 @@ 1.25 inline void ld( const Address& a, Register d, int offset = 0 ); 1.26 inline void ldd( const Address& a, Register d, int offset = 0 ); 1.27 1.28 + inline void ldub( Register s1, RegisterConstant s2, Register d ); 1.29 + inline void ldsb( Register s1, RegisterConstant s2, Register d ); 1.30 + inline void lduh( Register s1, RegisterConstant s2, Register d ); 1.31 + inline void ldsh( Register s1, RegisterConstant s2, Register d ); 1.32 + inline void lduw( Register s1, RegisterConstant s2, Register d ); 1.33 + inline void ldsw( Register s1, RegisterConstant s2, Register d ); 1.34 + inline void ldx( Register s1, RegisterConstant s2, Register d ); 1.35 + inline void ld( Register s1, RegisterConstant s2, Register d ); 1.36 + inline void ldd( Register s1, RegisterConstant s2, Register d ); 1.37 + 1.38 // pp 177 1.39 1.40 void ldsba( Register s1, Register s2, int ia, Register d ) { emit_long( op(ldst_op) | rd(d) | op3(ldsb_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); } 1.41 @@ -1518,6 +1535,13 @@ 1.42 inline void st( Register d, const Address& a, int offset = 0 ); 1.43 inline void std( Register d, const Address& a, int offset = 0 ); 1.44 1.45 + inline void stb( Register d, Register s1, RegisterConstant s2 ); 1.46 + inline void sth( Register d, Register s1, RegisterConstant s2 ); 1.47 + inline void stw( Register d, Register s1, RegisterConstant s2 ); 1.48 + inline void stx( Register d, Register s1, RegisterConstant s2 ); 1.49 + inline void std( Register d, Register s1, RegisterConstant s2 ); 1.50 + inline void st( Register d, Register s1, RegisterConstant s2 ); 1.51 + 1.52 // pp 177 1.53 1.54 void stba( Register d, Register s1, Register s2, int ia ) { emit_long( op(ldst_op) | rd(d) | op3(stb_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); } 1.55 @@ -1940,20 +1964,28 @@ 1.56 // st_ptr will perform st for 32 bit VM's and stx for 64 bit VM's 1.57 inline void ld_ptr( Register s1, Register s2, Register d ); 1.58 inline void ld_ptr( Register s1, int simm13a, Register d); 1.59 + inline void ld_ptr( Register s1, RegisterConstant s2, Register d ); 1.60 inline void ld_ptr( const Address& a, Register d, int offset = 0 ); 1.61 inline void st_ptr( Register d, Register s1, Register s2 ); 1.62 inline void st_ptr( Register d, Register s1, int simm13a); 1.63 + inline void st_ptr( Register d, Register s1, RegisterConstant s2 ); 1.64 inline void st_ptr( Register d, const Address& a, int offset = 0 ); 1.65 1.66 // ld_long will perform ld for 32 bit VM's and ldx for 64 bit VM's 1.67 // st_long will perform st for 32 bit VM's and stx for 64 bit VM's 1.68 inline void ld_long( Register s1, Register s2, Register d ); 1.69 inline void ld_long( Register s1, int simm13a, Register d ); 1.70 + inline void ld_long( Register s1, RegisterConstant s2, Register d ); 1.71 inline void ld_long( const Address& a, Register d, int offset = 0 ); 1.72 inline void st_long( Register d, Register s1, Register s2 ); 1.73 inline void st_long( Register d, Register s1, int simm13a ); 1.74 + inline void st_long( Register d, Register s1, RegisterConstant s2 ); 1.75 inline void st_long( Register d, const Address& a, int offset = 0 ); 1.76 1.77 + // Loading values by size and signed-ness 1.78 + void load_sized_value(Register s1, RegisterConstant s2, Register d, 1.79 + int size_in_bytes, bool is_signed); 1.80 + 1.81 // -------------------------------------------------- 1.82 1.83 public: 1.84 @@ -2281,6 +2313,8 @@ 1.85 // stack overflow + shadow pages. Clobbers tsp and scratch registers. 1.86 void bang_stack_size(Register Rsize, Register Rtsp, Register Rscratch); 1.87 1.88 + virtual RegisterConstant delayed_value(intptr_t* delayed_value_addr, Register tmp, int offset); 1.89 + 1.90 void verify_tlab(); 1.91 1.92 Condition negate_condition(Condition cond);