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

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

Print this page




 281 
 282 inline void MacroAssembler::fbp( Condition c, bool a, CC cc, Predict p, Label& L ) {
 283   Assembler::fbp(c, a, cc, p, L);
 284 }
 285 
 286 inline void MacroAssembler::jmp( Register s1, Register s2 ) { jmpl( s1, s2, G0 ); }
 287 inline void MacroAssembler::jmp( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, G0, rspec); }
 288 
 289 inline bool MacroAssembler::is_far_target(address d) {
 290   if (ForceUnreachable) {
 291     // References outside the code cache should be treated as far
 292     return d < CodeCache::low_bound() || d > CodeCache::high_bound();
 293   }
 294   return !is_in_wdisp30_range(d, CodeCache::low_bound()) || !is_in_wdisp30_range(d, CodeCache::high_bound());
 295 }
 296 
 297 // Call with a check to see if we need to deal with the added
 298 // expense of relocation and if we overflow the displacement
 299 // of the quick call instruction.
 300 inline void MacroAssembler::call( address d, relocInfo::relocType rt ) {




 301 #ifdef _LP64
 302   intptr_t disp;
 303   // NULL is ok because it will be relocated later.
 304   // Must change NULL to a reachable address in order to
 305   // pass asserts here and in wdisp.
 306   if ( d == NULL )
 307     d = pc();
 308 
 309   // Is this address within range of the call instruction?
 310   // If not, use the expensive instruction sequence
 311   if (is_far_target(d)) {
 312     relocate(rt);
 313     AddressLiteral dest(d);
 314     jumpl_to(dest, O7, O7);
 315   } else {
 316     Assembler::call(d, rt);
 317   }
 318 #else
 319   Assembler::call( d, rt );
 320 #endif
 321 }
 322 
 323 inline void MacroAssembler::call( Label& L,   relocInfo::relocType rt ) {
 324   insert_nop_after_cbcond();
 325   MacroAssembler::call( target(L), rt);
 326 }
 327 
 328 
 329 
 330 inline void MacroAssembler::callr( Register s1, Register s2 ) { jmpl( s1, s2, O7 ); }
 331 inline void MacroAssembler::callr( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, O7, rspec); }
 332 
 333 // prefetch instruction
 334 inline void MacroAssembler::iprefetch( address d, relocInfo::relocType rt ) {
 335   Assembler::bp( never, true, xcc, pt, d, rt );
 336     Assembler::bp( never, true, xcc, pt, d, rt );
 337 }
 338 inline void MacroAssembler::iprefetch( Label& L) { iprefetch( target(L) ); }
 339 




 281 
 282 inline void MacroAssembler::fbp( Condition c, bool a, CC cc, Predict p, Label& L ) {
 283   Assembler::fbp(c, a, cc, p, L);
 284 }
 285 
 286 inline void MacroAssembler::jmp( Register s1, Register s2 ) { jmpl( s1, s2, G0 ); }
 287 inline void MacroAssembler::jmp( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, G0, rspec); }
 288 
 289 inline bool MacroAssembler::is_far_target(address d) {
 290   if (ForceUnreachable) {
 291     // References outside the code cache should be treated as far
 292     return d < CodeCache::low_bound() || d > CodeCache::high_bound();
 293   }
 294   return !is_in_wdisp30_range(d, CodeCache::low_bound()) || !is_in_wdisp30_range(d, CodeCache::high_bound());
 295 }
 296 
 297 // Call with a check to see if we need to deal with the added
 298 // expense of relocation and if we overflow the displacement
 299 // of the quick call instruction.
 300 inline void MacroAssembler::call( address d, relocInfo::relocType rt ) {
 301   MacroAssembler::call(d, Relocation::spec_simple(rt));
 302 }
 303 
 304 inline void MacroAssembler::call( address d, RelocationHolder const& rspec ) {
 305 #ifdef _LP64
 306   intptr_t disp;
 307   // NULL is ok because it will be relocated later.
 308   // Must change NULL to a reachable address in order to
 309   // pass asserts here and in wdisp.
 310   if ( d == NULL )
 311     d = pc();
 312 
 313   // Is this address within range of the call instruction?
 314   // If not, use the expensive instruction sequence
 315   if (is_far_target(d)) {
 316     relocate(rspec);
 317     AddressLiteral dest(d);
 318     jumpl_to(dest, O7, O7);
 319   } else {
 320     Assembler::call(d, rspec);
 321   }
 322 #else
 323   Assembler::call( d, rspec );
 324 #endif
 325 }
 326 
 327 inline void MacroAssembler::call( Label& L,   relocInfo::relocType rt ) {
 328   insert_nop_after_cbcond();
 329   MacroAssembler::call( target(L), rt);
 330 }
 331 
 332 
 333 
 334 inline void MacroAssembler::callr( Register s1, Register s2 ) { jmpl( s1, s2, O7 ); }
 335 inline void MacroAssembler::callr( Register s1, int simm13a, RelocationHolder const& rspec ) { jmpl( s1, simm13a, O7, rspec); }
 336 
 337 // prefetch instruction
 338 inline void MacroAssembler::iprefetch( address d, relocInfo::relocType rt ) {
 339   Assembler::bp( never, true, xcc, pt, d, rt );
 340     Assembler::bp( never, true, xcc, pt, d, rt );
 341 }
 342 inline void MacroAssembler::iprefetch( Label& L) { iprefetch( target(L) ); }
 343 


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