equal
deleted
inserted
replaced
29 |
29 |
30 #define __ masm-> |
30 #define __ masm-> |
31 |
31 |
32 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type, |
32 void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type, |
33 Register dst, Address src, Register tmp1, Register tmp_thread) { |
33 Register dst, Address src, Register tmp1, Register tmp_thread) { |
34 bool on_heap = (decorators & IN_HEAP) != 0; |
34 bool in_heap = (decorators & IN_HEAP) != 0; |
35 bool on_root = (decorators & IN_ROOT) != 0; |
35 bool in_native = (decorators & IN_NATIVE) != 0; |
36 bool oop_not_null = (decorators & OOP_NOT_NULL) != 0; |
36 bool oop_not_null = (decorators & OOP_NOT_NULL) != 0; |
37 bool atomic = (decorators & MO_RELAXED) != 0; |
37 bool atomic = (decorators & MO_RELAXED) != 0; |
38 |
38 |
39 switch (type) { |
39 switch (type) { |
40 case T_OBJECT: |
40 case T_OBJECT: |
41 case T_ARRAY: { |
41 case T_ARRAY: { |
42 if (on_heap) { |
42 if (in_heap) { |
43 #ifdef _LP64 |
43 #ifdef _LP64 |
44 if (UseCompressedOops) { |
44 if (UseCompressedOops) { |
45 __ movl(dst, src); |
45 __ movl(dst, src); |
46 if (oop_not_null) { |
46 if (oop_not_null) { |
47 __ decode_heap_oop_not_null(dst); |
47 __ decode_heap_oop_not_null(dst); |
52 #endif |
52 #endif |
53 { |
53 { |
54 __ movptr(dst, src); |
54 __ movptr(dst, src); |
55 } |
55 } |
56 } else { |
56 } else { |
57 assert(on_root, "why else?"); |
57 assert(in_native, "why else?"); |
58 __ movptr(dst, src); |
58 __ movptr(dst, src); |
59 } |
59 } |
60 break; |
60 break; |
61 } |
61 } |
62 case T_BOOLEAN: __ load_unsigned_byte(dst, src); break; |
62 case T_BOOLEAN: __ load_unsigned_byte(dst, src); break; |
94 } |
94 } |
95 } |
95 } |
96 |
96 |
97 void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type, |
97 void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type, |
98 Address dst, Register val, Register tmp1, Register tmp2) { |
98 Address dst, Register val, Register tmp1, Register tmp2) { |
99 bool on_heap = (decorators & IN_HEAP) != 0; |
99 bool in_heap = (decorators & IN_HEAP) != 0; |
100 bool on_root = (decorators & IN_ROOT) != 0; |
100 bool in_native = (decorators & IN_NATIVE) != 0; |
101 bool oop_not_null = (decorators & OOP_NOT_NULL) != 0; |
101 bool oop_not_null = (decorators & OOP_NOT_NULL) != 0; |
102 bool atomic = (decorators & MO_RELAXED) != 0; |
102 bool atomic = (decorators & MO_RELAXED) != 0; |
103 |
103 |
104 switch (type) { |
104 switch (type) { |
105 case T_OBJECT: |
105 case T_OBJECT: |
106 case T_ARRAY: { |
106 case T_ARRAY: { |
107 if (on_heap) { |
107 if (in_heap) { |
108 if (val == noreg) { |
108 if (val == noreg) { |
109 assert(!oop_not_null, "inconsistent access"); |
109 assert(!oop_not_null, "inconsistent access"); |
110 #ifdef _LP64 |
110 #ifdef _LP64 |
111 if (UseCompressedOops) { |
111 if (UseCompressedOops) { |
112 __ movl(dst, (int32_t)NULL_WORD); |
112 __ movl(dst, (int32_t)NULL_WORD); |
131 { |
131 { |
132 __ movptr(dst, val); |
132 __ movptr(dst, val); |
133 } |
133 } |
134 } |
134 } |
135 } else { |
135 } else { |
136 assert(on_root, "why else?"); |
136 assert(in_native, "why else?"); |
137 assert(val != noreg, "not supported"); |
137 assert(val != noreg, "not supported"); |
138 __ movptr(dst, val); |
138 __ movptr(dst, val); |
139 } |
139 } |
140 break; |
140 break; |
141 } |
141 } |