< prev index next >

src/hotspot/cpu/ppc/templateTable_ppc_64.cpp

Print this page




  45 #undef __
  46 #define __ _masm->
  47 
  48 // ============================================================================
  49 // Misc helpers
  50 
  51 // Do an oop store like *(base + index) = val OR *(base + offset) = val
  52 // (only one of both variants is possible at the same time).
  53 // Index can be noreg.
  54 // Kills:
  55 //   Rbase, Rtmp
  56 static void do_oop_store(InterpreterMacroAssembler* _masm,
  57                          Register           base,
  58                          RegisterOrConstant offset,
  59                          Register           val,         // Noreg means always null.
  60                          Register           tmp1,
  61                          Register           tmp2,
  62                          Register           tmp3,
  63                          DecoratorSet       decorators) {
  64   assert_different_registers(tmp1, tmp2, tmp3, val, base);
  65   BarrierSetAssembler *bs = Universe::heap()->barrier_set()->barrier_set_assembler();
  66   bs->store_at(_masm, decorators, T_OBJECT, base, offset, val, tmp1, tmp2, tmp3, false);
  67 }
  68 
  69 static void do_oop_load(InterpreterMacroAssembler* _masm,
  70                         Register base,
  71                         RegisterOrConstant offset,
  72                         Register dst,
  73                         Register tmp1,
  74                         Register tmp2,
  75                         DecoratorSet decorators) {
  76   assert_different_registers(base, tmp1, tmp2);
  77   assert_different_registers(dst, tmp1, tmp2);
  78   BarrierSetAssembler *bs = Universe::heap()->barrier_set()->barrier_set_assembler();
  79   bs->load_at(_masm, decorators, T_OBJECT, base, offset, dst, tmp1, tmp2, false);
  80 }
  81 
  82 // ============================================================================
  83 // Platform-dependent initialization
  84 
  85 void TemplateTable::pd_initialize() {
  86   // No ppc64 specific initialization.
  87 }
  88 
  89 Address TemplateTable::at_bcp(int offset) {
  90   // Not used on ppc.
  91   ShouldNotReachHere();
  92   return Address();
  93 }
  94 
  95 // Patches the current bytecode (ptr to it located in bcp)
  96 // in the bytecode stream with a new one.
  97 void TemplateTable::patch_bytecode(Bytecodes::Code new_bc, Register Rnew_bc, Register Rtemp, bool load_bc_into_bc_reg /*=true*/, int byte_no) {
  98   // With sharing on, may need to test method flag.




  45 #undef __
  46 #define __ _masm->
  47 
  48 // ============================================================================
  49 // Misc helpers
  50 
  51 // Do an oop store like *(base + index) = val OR *(base + offset) = val
  52 // (only one of both variants is possible at the same time).
  53 // Index can be noreg.
  54 // Kills:
  55 //   Rbase, Rtmp
  56 static void do_oop_store(InterpreterMacroAssembler* _masm,
  57                          Register           base,
  58                          RegisterOrConstant offset,
  59                          Register           val,         // Noreg means always null.
  60                          Register           tmp1,
  61                          Register           tmp2,
  62                          Register           tmp3,
  63                          DecoratorSet       decorators) {
  64   assert_different_registers(tmp1, tmp2, tmp3, val, base);
  65   BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
  66   bs->store_at(_masm, decorators, T_OBJECT, base, offset, val, tmp1, tmp2, tmp3, false);
  67 }
  68 
  69 static void do_oop_load(InterpreterMacroAssembler* _masm,
  70                         Register base,
  71                         RegisterOrConstant offset,
  72                         Register dst,
  73                         Register tmp1,
  74                         Register tmp2,
  75                         DecoratorSet decorators) {
  76   assert_different_registers(base, tmp1, tmp2);
  77   assert_different_registers(dst, tmp1, tmp2);
  78   BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
  79   bs->load_at(_masm, decorators, T_OBJECT, base, offset, dst, tmp1, tmp2, false);
  80 }
  81 
  82 // ============================================================================
  83 // Platform-dependent initialization
  84 
  85 void TemplateTable::pd_initialize() {
  86   // No ppc64 specific initialization.
  87 }
  88 
  89 Address TemplateTable::at_bcp(int offset) {
  90   // Not used on ppc.
  91   ShouldNotReachHere();
  92   return Address();
  93 }
  94 
  95 // Patches the current bytecode (ptr to it located in bcp)
  96 // in the bytecode stream with a new one.
  97 void TemplateTable::patch_bytecode(Bytecodes::Code new_bc, Register Rnew_bc, Register Rtemp, bool load_bc_into_bc_reg /*=true*/, int byte_no) {
  98   // With sharing on, may need to test method flag.


< prev index next >