src/hotspot/cpu/sparc/gc/shared/barrierSetAssembler_sparc.cpp
changeset 50599 ecc2af326b5f
parent 50380 bec342339138
child 50728 9375184cec98
equal deleted inserted replaced
50598:8d9d4d91be7f 50599:ecc2af326b5f
    30 
    30 
    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 val, Address dst, Register tmp) {
    34                                    Register val, Address dst, Register tmp) {
    35   bool on_heap = (decorators & IN_HEAP) != 0;
    35   bool in_heap = (decorators & IN_HEAP) != 0;
    36   bool on_root = (decorators & IN_ROOT) != 0;
    36   bool in_native = (decorators & IN_NATIVE) != 0;
    37   bool oop_not_null = (decorators & OOP_NOT_NULL) != 0;
    37   bool oop_not_null = (decorators & OOP_NOT_NULL) != 0;
    38 
    38 
    39   switch (type) {
    39   switch (type) {
    40   case T_ARRAY:
    40   case T_ARRAY:
    41   case T_OBJECT: {
    41   case T_OBJECT: {
    42     if (on_heap) {
    42     if (in_heap) {
    43       if (dst.has_disp() && !Assembler::is_simm13(dst.disp())) {
    43       if (dst.has_disp() && !Assembler::is_simm13(dst.disp())) {
    44         assert(!dst.has_index(), "not supported yet");
    44         assert(!dst.has_index(), "not supported yet");
    45         __ set(dst.disp(), tmp);
    45         __ set(dst.disp(), tmp);
    46         dst = Address(dst.base(), tmp);
    46         dst = Address(dst.base(), tmp);
    47       }
    47       }
    55         __ st(val, dst);
    55         __ st(val, dst);
    56       } else {
    56       } else {
    57         __ st_ptr(val, dst);
    57         __ st_ptr(val, dst);
    58       }
    58       }
    59     } else {
    59     } else {
    60       assert(on_root, "why else?");
    60       assert(in_native, "why else?");
    61       __ st_ptr(val, dst);
    61       __ st_ptr(val, dst);
    62     }
    62     }
    63     break;
    63     break;
    64   }
    64   }
    65   default: Unimplemented();
    65   default: Unimplemented();
    66   }
    66   }
    67 }
    67 }
    68 
    68 
    69 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    69 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    70                                   Address src, Register dst, Register tmp) {
    70                                   Address src, Register dst, Register tmp) {
    71   bool on_heap = (decorators & IN_HEAP) != 0;
    71   bool in_heap = (decorators & IN_HEAP) != 0;
    72   bool on_root = (decorators & IN_ROOT) != 0;
    72   bool in_native = (decorators & IN_NATIVE) != 0;
    73   bool oop_not_null = (decorators & OOP_NOT_NULL) != 0;
    73   bool oop_not_null = (decorators & OOP_NOT_NULL) != 0;
    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 (on_heap) {
    78     if (in_heap) {
    79       if (src.has_disp() && !Assembler::is_simm13(src.disp())) {
    79       if (src.has_disp() && !Assembler::is_simm13(src.disp())) {
    80         assert(!src.has_index(), "not supported yet");
    80         assert(!src.has_index(), "not supported yet");
    81         __ set(src.disp(), tmp);
    81         __ set(src.disp(), tmp);
    82         src = Address(src.base(), tmp);
    82         src = Address(src.base(), tmp);
    83       }
    83       }
    90         }
    90         }
    91       } else {
    91       } else {
    92         __ ld_ptr(src, dst);
    92         __ ld_ptr(src, dst);
    93       }
    93       }
    94     } else {
    94     } else {
    95       assert(on_root, "why else?");
    95       assert(in_native, "why else?");
    96       __ ld_ptr(src, dst);
    96       __ ld_ptr(src, dst);
    97     }
    97     }
    98     break;
    98     break;
    99   }
    99   }
   100   default: Unimplemented();
   100   default: Unimplemented();