26 #include "asm/macroAssembler.inline.hpp"
27 #include "compiler/disassembler.hpp"
28 #include "gc/shared/cardTable.hpp"
29 #include "gc/shared/cardTableModRefBS.hpp"
30 #include "gc/shared/collectedHeap.inline.hpp"
31 #include "interpreter/interpreter.hpp"
32 #include "memory/resourceArea.hpp"
33 #include "nativeInst_ppc.hpp"
34 #include "prims/methodHandles.hpp"
35 #include "runtime/biasedLocking.hpp"
36 #include "runtime/icache.hpp"
37 #include "runtime/interfaceSupport.hpp"
38 #include "runtime/objectMonitor.hpp"
39 #include "runtime/os.hpp"
40 #include "runtime/safepoint.hpp"
41 #include "runtime/safepointMechanism.hpp"
42 #include "runtime/sharedRuntime.hpp"
43 #include "runtime/stubRoutines.hpp"
44 #include "utilities/macros.hpp"
45 #if INCLUDE_ALL_GCS
46 #include "gc/g1/g1CardTable.hpp"
47 #include "gc/g1/g1CollectedHeap.inline.hpp"
48 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
49 #include "gc/g1/heapRegion.hpp"
50 #endif // INCLUDE_ALL_GCS
51 #ifdef COMPILER2
52 #include "opto/intrinsicnode.hpp"
53 #endif
54
55 #ifdef PRODUCT
56 #define BLOCK_COMMENT(str) // nothing
57 #else
58 #define BLOCK_COMMENT(str) block_comment(str)
59 #endif
60 #define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
61
62 #ifdef ASSERT
63 // On RISC, there's no benefit to verifying instruction boundaries.
64 bool AbstractAssembler::pd_check_instruction_mark() { return false; }
65 #endif
66
67 void MacroAssembler::ld_largeoffset_unchecked(Register d, int si31, Register a, int emit_filler_nop) {
|
26 #include "asm/macroAssembler.inline.hpp"
27 #include "compiler/disassembler.hpp"
28 #include "gc/shared/cardTable.hpp"
29 #include "gc/shared/cardTableModRefBS.hpp"
30 #include "gc/shared/collectedHeap.inline.hpp"
31 #include "interpreter/interpreter.hpp"
32 #include "memory/resourceArea.hpp"
33 #include "nativeInst_ppc.hpp"
34 #include "prims/methodHandles.hpp"
35 #include "runtime/biasedLocking.hpp"
36 #include "runtime/icache.hpp"
37 #include "runtime/interfaceSupport.hpp"
38 #include "runtime/objectMonitor.hpp"
39 #include "runtime/os.hpp"
40 #include "runtime/safepoint.hpp"
41 #include "runtime/safepointMechanism.hpp"
42 #include "runtime/sharedRuntime.hpp"
43 #include "runtime/stubRoutines.hpp"
44 #include "utilities/macros.hpp"
45 #if INCLUDE_ALL_GCS
46 #include "gc/g1/g1BarrierSet.hpp"
47 #include "gc/g1/g1CardTable.hpp"
48 #include "gc/g1/g1CollectedHeap.inline.hpp"
49 #include "gc/g1/heapRegion.hpp"
50 #endif // INCLUDE_ALL_GCS
51 #ifdef COMPILER2
52 #include "opto/intrinsicnode.hpp"
53 #endif
54
55 #ifdef PRODUCT
56 #define BLOCK_COMMENT(str) // nothing
57 #else
58 #define BLOCK_COMMENT(str) block_comment(str)
59 #endif
60 #define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
61
62 #ifdef ASSERT
63 // On RISC, there's no benefit to verifying instruction boundaries.
64 bool AbstractAssembler::pd_check_instruction_mark() { return false; }
65 #endif
66
67 void MacroAssembler::ld_largeoffset_unchecked(Register d, int si31, Register a, int emit_filler_nop) {
|
3153
3154 if (Rpre_val->is_volatile() && Robj == noreg) mr(R31, Rpre_val); // Save pre_val across C call if it was preloaded.
3155 call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), Rpre_val, R16_thread);
3156 if (Rpre_val->is_volatile() && Robj == noreg) mr(Rpre_val, R31); // restore
3157
3158 if (needs_frame) {
3159 pop_frame();
3160 restore_LR_CR(Rtmp1);
3161 }
3162
3163 bind(filtered);
3164 }
3165
3166 // General G1 post-barrier generator
3167 // Store cross-region card.
3168 void MacroAssembler::g1_write_barrier_post(Register Rstore_addr, Register Rnew_val, Register Rtmp1, Register Rtmp2, Register Rtmp3, L
3169 Label runtime, filtered_int;
3170 Label& filtered = (filtered_ext != NULL) ? *filtered_ext : filtered_int;
3171 assert_different_registers(Rstore_addr, Rnew_val, Rtmp1, Rtmp2);
3172
3173 G1SATBCardTableLoggingModRefBS* bs =
3174 barrier_set_cast<G1SATBCardTableLoggingModRefBS>(Universe::heap()->barrier_set());
3175 CardTable* ct = bs->card_table();
3176
3177 // Does store cross heap regions?
3178 if (G1RSBarrierRegionFilter) {
3179 xorr(Rtmp1, Rstore_addr, Rnew_val);
3180 srdi_(Rtmp1, Rtmp1, HeapRegion::LogOfHRGrainBytes);
3181 beq(CCR0, filtered);
3182 }
3183
3184 // Crosses regions, storing NULL?
3185 #ifdef ASSERT
3186 cmpdi(CCR0, Rnew_val, 0);
3187 asm_assert_ne("null oop not allowed (G1)", 0x322); // Checked by caller on PPC64, so following branch is obsolete:
3188 //beq(CCR0, filtered);
3189 #endif
3190
3191 // Storing region crossing non-NULL, is card already dirty?
3192 assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
3193 const Register Rcard_addr = Rtmp1;
|
3153
3154 if (Rpre_val->is_volatile() && Robj == noreg) mr(R31, Rpre_val); // Save pre_val across C call if it was preloaded.
3155 call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), Rpre_val, R16_thread);
3156 if (Rpre_val->is_volatile() && Robj == noreg) mr(Rpre_val, R31); // restore
3157
3158 if (needs_frame) {
3159 pop_frame();
3160 restore_LR_CR(Rtmp1);
3161 }
3162
3163 bind(filtered);
3164 }
3165
3166 // General G1 post-barrier generator
3167 // Store cross-region card.
3168 void MacroAssembler::g1_write_barrier_post(Register Rstore_addr, Register Rnew_val, Register Rtmp1, Register Rtmp2, Register Rtmp3, L
3169 Label runtime, filtered_int;
3170 Label& filtered = (filtered_ext != NULL) ? *filtered_ext : filtered_int;
3171 assert_different_registers(Rstore_addr, Rnew_val, Rtmp1, Rtmp2);
3172
3173 G1BarrierSet* bs =
3174 barrier_set_cast<G1BarrierSet>(Universe::heap()->barrier_set());
3175 CardTable* ct = bs->card_table();
3176
3177 // Does store cross heap regions?
3178 if (G1RSBarrierRegionFilter) {
3179 xorr(Rtmp1, Rstore_addr, Rnew_val);
3180 srdi_(Rtmp1, Rtmp1, HeapRegion::LogOfHRGrainBytes);
3181 beq(CCR0, filtered);
3182 }
3183
3184 // Crosses regions, storing NULL?
3185 #ifdef ASSERT
3186 cmpdi(CCR0, Rnew_val, 0);
3187 asm_assert_ne("null oop not allowed (G1)", 0x322); // Checked by caller on PPC64, so following branch is obsolete:
3188 //beq(CCR0, filtered);
3189 #endif
3190
3191 // Storing region crossing non-NULL, is card already dirty?
3192 assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
3193 const Register Rcard_addr = Rtmp1;
|