< prev index next >

src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp

Print this page
rev 50535 : [mq]: rename_IN_ROOT


  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "asm/macroAssembler.inline.hpp"
  28 #include "gc/shared/barrierSetAssembler.hpp"
  29 #include "interpreter/interp_masm.hpp"
  30 
  31 #define __ masm->
  32 
  33 void BarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
  34                                              Register dst, Register count, bool do_return) {
  35   if (do_return) { __ z_br(Z_R14); }
  36 }
  37 
  38 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
  39                                   const Address& addr, Register dst, Register tmp1, Register tmp2, Label *L_handle_null) {
  40   bool on_heap  = (decorators & IN_HEAP) != 0;
  41   bool on_root  = (decorators & IN_ROOT) != 0;
  42   bool not_null = (decorators & OOP_NOT_NULL) != 0;
  43   assert(on_heap || on_root, "where?");
  44 
  45   switch (type) {
  46   case T_ARRAY:
  47   case T_OBJECT: {
  48     if (UseCompressedOops && on_heap) {
  49       __ z_llgf(dst, addr);
  50       if (L_handle_null != NULL) { // Label provided.
  51         __ compareU32_and_branch(dst, (intptr_t)0, Assembler::bcondEqual, *L_handle_null);
  52         __ oop_decoder(dst, dst, false);
  53       } else {
  54         __ oop_decoder(dst, dst, !not_null);
  55       }
  56     } else {
  57       __ z_lg(dst, addr);
  58       if (L_handle_null != NULL) {
  59         __ compareU64_and_branch(dst, (intptr_t)0, Assembler::bcondEqual, *L_handle_null);
  60       }
  61     }
  62     break;
  63   }
  64   default: Unimplemented();
  65   }
  66 }
  67 
  68 void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
  69                                    const Address& addr, Register val, Register tmp1, Register tmp2, Register tmp3) {
  70   bool on_heap  = (decorators & IN_HEAP) != 0;
  71   bool on_root  = (decorators & IN_ROOT) != 0;
  72   bool not_null = (decorators & OOP_NOT_NULL) != 0;
  73   assert(on_heap || on_root, "where?");
  74   assert_different_registers(val, tmp1, tmp2);
  75 
  76   switch (type) {
  77   case T_ARRAY:
  78   case T_OBJECT: {
  79     if (UseCompressedOops && on_heap) {
  80       if (val == noreg) {
  81         __ clear_mem(addr, 4);
  82       } else if (Universe::narrow_oop_mode() == Universe::UnscaledNarrowOop) {
  83         __ z_st(val, addr);
  84       } else {
  85         Register tmp = (tmp1 != Z_R1) ? tmp1 : tmp2; // Avoid tmp == Z_R1 (see oop_encoder).
  86         __ oop_encoder(tmp, val, !not_null);
  87         __ z_st(tmp, addr);
  88       }
  89     } else {
  90       if (val == noreg) {
  91         __ clear_mem(addr, 8);




  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "asm/macroAssembler.inline.hpp"
  28 #include "gc/shared/barrierSetAssembler.hpp"
  29 #include "interpreter/interp_masm.hpp"
  30 
  31 #define __ masm->
  32 
  33 void BarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
  34                                              Register dst, Register count, bool do_return) {
  35   if (do_return) { __ z_br(Z_R14); }
  36 }
  37 
  38 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
  39                                   const Address& addr, Register dst, Register tmp1, Register tmp2, Label *L_handle_null) {
  40   bool on_heap  = (decorators & IN_HEAP) != 0;
  41   bool on_root  = (decorators & IN_NATIVE) != 0;
  42   bool not_null = (decorators & OOP_NOT_NULL) != 0;
  43   assert(on_heap || on_root, "where?");
  44 
  45   switch (type) {
  46   case T_ARRAY:
  47   case T_OBJECT: {
  48     if (UseCompressedOops && on_heap) {
  49       __ z_llgf(dst, addr);
  50       if (L_handle_null != NULL) { // Label provided.
  51         __ compareU32_and_branch(dst, (intptr_t)0, Assembler::bcondEqual, *L_handle_null);
  52         __ oop_decoder(dst, dst, false);
  53       } else {
  54         __ oop_decoder(dst, dst, !not_null);
  55       }
  56     } else {
  57       __ z_lg(dst, addr);
  58       if (L_handle_null != NULL) {
  59         __ compareU64_and_branch(dst, (intptr_t)0, Assembler::bcondEqual, *L_handle_null);
  60       }
  61     }
  62     break;
  63   }
  64   default: Unimplemented();
  65   }
  66 }
  67 
  68 void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
  69                                    const Address& addr, Register val, Register tmp1, Register tmp2, Register tmp3) {
  70   bool on_heap  = (decorators & IN_HEAP) != 0;
  71   bool on_root  = (decorators & IN_NATIVE) != 0;
  72   bool not_null = (decorators & OOP_NOT_NULL) != 0;
  73   assert(on_heap || on_root, "where?");
  74   assert_different_registers(val, tmp1, tmp2);
  75 
  76   switch (type) {
  77   case T_ARRAY:
  78   case T_OBJECT: {
  79     if (UseCompressedOops && on_heap) {
  80       if (val == noreg) {
  81         __ clear_mem(addr, 4);
  82       } else if (Universe::narrow_oop_mode() == Universe::UnscaledNarrowOop) {
  83         __ z_st(val, addr);
  84       } else {
  85         Register tmp = (tmp1 != Z_R1) ? tmp1 : tmp2; // Avoid tmp == Z_R1 (see oop_encoder).
  86         __ oop_encoder(tmp, val, !not_null);
  87         __ z_st(tmp, addr);
  88       }
  89     } else {
  90       if (val == noreg) {
  91         __ clear_mem(addr, 8);


< prev index next >