src/cpu/sparc/vm/assembler_sparc.inline.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6829193 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/assembler_sparc.inline.hpp

Print this page




 189 inline void Assembler::ldd( const Address& a, Register d, int offset) {
 190   if (a.has_index()) { assert(offset == 0, ""); ldd( a.base(), a.index(),         d); }
 191   else               {                          ldd( a.base(), a.disp() + offset, d); }
 192 }
 193 inline void Assembler::ldx( const Address& a, Register d, int offset) {
 194   if (a.has_index()) { assert(offset == 0, ""); ldx( a.base(), a.index(),         d); }
 195   else               {                          ldx( a.base(), a.disp() + offset, d); }
 196 }
 197 
 198 inline void Assembler::ldub(Register s1, RegisterOrConstant s2, Register d) { ldub(Address(s1, s2), d); }
 199 inline void Assembler::ldsb(Register s1, RegisterOrConstant s2, Register d) { ldsb(Address(s1, s2), d); }
 200 inline void Assembler::lduh(Register s1, RegisterOrConstant s2, Register d) { lduh(Address(s1, s2), d); }
 201 inline void Assembler::ldsh(Register s1, RegisterOrConstant s2, Register d) { ldsh(Address(s1, s2), d); }
 202 inline void Assembler::lduw(Register s1, RegisterOrConstant s2, Register d) { lduw(Address(s1, s2), d); }
 203 inline void Assembler::ldsw(Register s1, RegisterOrConstant s2, Register d) { ldsw(Address(s1, s2), d); }
 204 inline void Assembler::ldx( Register s1, RegisterOrConstant s2, Register d) { ldx( Address(s1, s2), d); }
 205 inline void Assembler::ld(  Register s1, RegisterOrConstant s2, Register d) { ld(  Address(s1, s2), d); }
 206 inline void Assembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); }
 207 
 208 // form effective addresses this way:
 209 inline void Assembler::add(   Register s1, RegisterOrConstant s2, Register d, int offset) {
 210   if (s2.is_register())  add(s1, s2.as_register(), d);
 211   else                 { add(s1, s2.as_constant() + offset, d); offset = 0; }
 212   if (offset != 0)       add(d,  offset,                    d);
 213 }
 214 






 215 inline void Assembler::ldstub(  Register s1, Register s2, Register d) { emit_long( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | rs2(s2) ); }
 216 inline void Assembler::ldstub(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
 217 
 218 
 219 inline void Assembler::prefetch(Register s1, Register s2, PrefetchFcn f) { v9_only();  emit_long( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | rs2(s2) ); }
 220 inline void Assembler::prefetch(Register s1, int simm13a, PrefetchFcn f) { v9_only();  emit_data( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
 221 
 222 inline void Assembler::prefetch(const Address& a, PrefetchFcn f, int offset) { v9_only(); relocate(a.rspec(offset)); prefetch(a.base(), a.disp() + offset, f); }
 223 
 224 
 225 inline void Assembler::rett( Register s1, Register s2                         ) { emit_long( op(arith_op) | op3(rett_op3) | rs1(s1) | rs2(s2));  has_delay_slot(); }
 226 inline void Assembler::rett( Register s1, int simm13a, relocInfo::relocType rt) { emit_data( op(arith_op) | op3(rett_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rt);  has_delay_slot(); }
 227 
 228 inline void Assembler::sethi( int imm22a, Register d, RelocationHolder const& rspec ) { emit_data( op(branch_op) | rd(d) | op2(sethi_op2) | hi22(imm22a), rspec); }
 229 
 230   // pp 222
 231 
 232 inline void Assembler::stf(    FloatRegisterImpl::Width w, FloatRegister d, Register s1, RegisterOrConstant s2) {
 233   if (s2.is_register()) stf(w, d, s1, s2.as_register());
 234   else                  stf(w, d, s1, s2.as_constant());




 189 inline void Assembler::ldd( const Address& a, Register d, int offset) {
 190   if (a.has_index()) { assert(offset == 0, ""); ldd( a.base(), a.index(),         d); }
 191   else               {                          ldd( a.base(), a.disp() + offset, d); }
 192 }
 193 inline void Assembler::ldx( const Address& a, Register d, int offset) {
 194   if (a.has_index()) { assert(offset == 0, ""); ldx( a.base(), a.index(),         d); }
 195   else               {                          ldx( a.base(), a.disp() + offset, d); }
 196 }
 197 
 198 inline void Assembler::ldub(Register s1, RegisterOrConstant s2, Register d) { ldub(Address(s1, s2), d); }
 199 inline void Assembler::ldsb(Register s1, RegisterOrConstant s2, Register d) { ldsb(Address(s1, s2), d); }
 200 inline void Assembler::lduh(Register s1, RegisterOrConstant s2, Register d) { lduh(Address(s1, s2), d); }
 201 inline void Assembler::ldsh(Register s1, RegisterOrConstant s2, Register d) { ldsh(Address(s1, s2), d); }
 202 inline void Assembler::lduw(Register s1, RegisterOrConstant s2, Register d) { lduw(Address(s1, s2), d); }
 203 inline void Assembler::ldsw(Register s1, RegisterOrConstant s2, Register d) { ldsw(Address(s1, s2), d); }
 204 inline void Assembler::ldx( Register s1, RegisterOrConstant s2, Register d) { ldx( Address(s1, s2), d); }
 205 inline void Assembler::ld(  Register s1, RegisterOrConstant s2, Register d) { ld(  Address(s1, s2), d); }
 206 inline void Assembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); }
 207 
 208 // form effective addresses this way:
 209 inline void Assembler::add(Register s1, RegisterOrConstant s2, Register d, int offset) {
 210   if (s2.is_register())  add(s1, s2.as_register(),          d);
 211   else                 { add(s1, s2.as_constant() + offset, d); offset = 0; }
 212   if (offset != 0)       add(d,  offset,                    d);
 213 }
 214 
 215 inline void Assembler::andn(Register s1, RegisterOrConstant s2, Register d, int offset) {
 216   if (s2.is_register())  andn(s1, s2.as_register(),          d);
 217   else                 { andn(s1, s2.as_constant() + offset, d); offset = 0; }
 218   if (offset != 0)       andn(d,  offset,                    d);
 219 }
 220 
 221 inline void Assembler::ldstub(  Register s1, Register s2, Register d) { emit_long( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | rs2(s2) ); }
 222 inline void Assembler::ldstub(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
 223 
 224 
 225 inline void Assembler::prefetch(Register s1, Register s2, PrefetchFcn f) { v9_only();  emit_long( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | rs2(s2) ); }
 226 inline void Assembler::prefetch(Register s1, int simm13a, PrefetchFcn f) { v9_only();  emit_data( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
 227 
 228 inline void Assembler::prefetch(const Address& a, PrefetchFcn f, int offset) { v9_only(); relocate(a.rspec(offset)); prefetch(a.base(), a.disp() + offset, f); }
 229 
 230 
 231 inline void Assembler::rett( Register s1, Register s2                         ) { emit_long( op(arith_op) | op3(rett_op3) | rs1(s1) | rs2(s2));  has_delay_slot(); }
 232 inline void Assembler::rett( Register s1, int simm13a, relocInfo::relocType rt) { emit_data( op(arith_op) | op3(rett_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rt);  has_delay_slot(); }
 233 
 234 inline void Assembler::sethi( int imm22a, Register d, RelocationHolder const& rspec ) { emit_data( op(branch_op) | rd(d) | op2(sethi_op2) | hi22(imm22a), rspec); }
 235 
 236   // pp 222
 237 
 238 inline void Assembler::stf(    FloatRegisterImpl::Width w, FloatRegister d, Register s1, RegisterOrConstant s2) {
 239   if (s2.is_register()) stf(w, d, s1, s2.as_register());
 240   else                  stf(w, d, s1, s2.as_constant());


src/cpu/sparc/vm/assembler_sparc.inline.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File