src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
changeset 50599 ecc2af326b5f
parent 50162 f9fe56417050
child 50728 9375184cec98
equal deleted inserted replaced
50598:8d9d4d91be7f 50599:ecc2af326b5f
    31 #define __ masm->
    31 #define __ masm->
    32 
    32 
    33 void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    33 void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    34                                    Register base, RegisterOrConstant ind_or_offs, Register val,
    34                                    Register base, RegisterOrConstant ind_or_offs, Register val,
    35                                    Register tmp1, Register tmp2, Register tmp3, bool needs_frame) {
    35                                    Register tmp1, Register tmp2, Register tmp3, bool needs_frame) {
    36   bool on_heap  = (decorators & IN_HEAP) != 0;
    36   bool in_heap = (decorators & IN_HEAP) != 0;
    37   bool on_root  = (decorators & IN_ROOT) != 0;
    37   bool in_native = (decorators & IN_NATIVE) != 0;
    38   bool not_null = (decorators & OOP_NOT_NULL) != 0;
    38   bool not_null = (decorators & OOP_NOT_NULL) != 0;
    39   assert(on_heap || on_root, "where?");
    39   assert(in_heap || in_native, "where?");
    40   assert_different_registers(base, val, tmp1, tmp2, R0);
    40   assert_different_registers(base, val, tmp1, tmp2, R0);
    41 
    41 
    42   switch (type) {
    42   switch (type) {
    43   case T_ARRAY:
    43   case T_ARRAY:
    44   case T_OBJECT: {
    44   case T_OBJECT: {
    45     if (UseCompressedOops && on_heap) {
    45     if (UseCompressedOops && in_heap) {
    46       Register co = tmp1;
    46       Register co = tmp1;
    47       if (val == noreg) {
    47       if (val == noreg) {
    48         __ li(co, 0);
    48         __ li(co, 0);
    49       } else {
    49       } else {
    50         co = not_null ? __ encode_heap_oop_not_null(tmp1, val) : __ encode_heap_oop(tmp1, val);
    50         co = not_null ? __ encode_heap_oop_not_null(tmp1, val) : __ encode_heap_oop(tmp1, val);
    64 }
    64 }
    65 
    65 
    66 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    66 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    67                                   Register base, RegisterOrConstant ind_or_offs, Register dst,
    67                                   Register base, RegisterOrConstant ind_or_offs, Register dst,
    68                                   Register tmp1, Register tmp2, bool needs_frame, Label *L_handle_null) {
    68                                   Register tmp1, Register tmp2, bool needs_frame, Label *L_handle_null) {
    69   bool on_heap  = (decorators & IN_HEAP) != 0;
    69   bool in_heap = (decorators & IN_HEAP) != 0;
    70   bool on_root  = (decorators & IN_ROOT) != 0;
    70   bool in_native = (decorators & IN_NATIVE) != 0;
    71   bool not_null = (decorators & OOP_NOT_NULL) != 0;
    71   bool not_null = (decorators & OOP_NOT_NULL) != 0;
    72   assert(on_heap || on_root, "where?");
    72   assert(in_heap || in_native, "where?");
    73   assert_different_registers(ind_or_offs.register_or_noreg(), dst, R0);
    73   assert_different_registers(ind_or_offs.register_or_noreg(), dst, R0);
    74 
    74 
    75   switch (type) {
    75   switch (type) {
    76   case T_ARRAY:
    76   case T_ARRAY:
    77   case T_OBJECT: {
    77   case T_OBJECT: {
    78     if (UseCompressedOops && on_heap) {
    78     if (UseCompressedOops && in_heap) {
    79       if (L_handle_null != NULL) { // Label provided.
    79       if (L_handle_null != NULL) { // Label provided.
    80         __ lwz(dst, ind_or_offs, base);
    80         __ lwz(dst, ind_or_offs, base);
    81         __ cmpwi(CCR0, dst, 0);
    81         __ cmpwi(CCR0, dst, 0);
    82         __ beq(CCR0, *L_handle_null);
    82         __ beq(CCR0, *L_handle_null);
    83         __ decode_heap_oop_not_null(dst);
    83         __ decode_heap_oop_not_null(dst);