< prev index next >

src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp

Print this page
rev 53052 : [mq]: asm.patch


 949   __ ret(0);
 950 #else
 951   ShouldNotReachHere();
 952 #endif
 953   return start;
 954 }
 955 
 956 #undef __
 957 
 958 void ShenandoahBarrierSetAssembler::barrier_stubs_init() {
 959   if (ShenandoahWriteBarrier || ShenandoahStoreValEnqueueBarrier) {
 960     int stub_code_size = 4096;
 961     ResourceMark rm;
 962     BufferBlob* bb = BufferBlob::create("shenandoah_barrier_stubs", stub_code_size);
 963     CodeBuffer buf(bb);
 964     StubCodeGenerator cgen(&buf);
 965     _shenandoah_wb = generate_shenandoah_wb(&cgen, false, true);
 966     _shenandoah_wb_C = generate_shenandoah_wb(&cgen, true, !ShenandoahWriteBarrierCsetTestInIR);
 967   }
 968 }

























 949   __ ret(0);
 950 #else
 951   ShouldNotReachHere();
 952 #endif
 953   return start;
 954 }
 955 
 956 #undef __
 957 
 958 void ShenandoahBarrierSetAssembler::barrier_stubs_init() {
 959   if (ShenandoahWriteBarrier || ShenandoahStoreValEnqueueBarrier) {
 960     int stub_code_size = 4096;
 961     ResourceMark rm;
 962     BufferBlob* bb = BufferBlob::create("shenandoah_barrier_stubs", stub_code_size);
 963     CodeBuffer buf(bb);
 964     StubCodeGenerator cgen(&buf);
 965     _shenandoah_wb = generate_shenandoah_wb(&cgen, false, true);
 966     _shenandoah_wb_C = generate_shenandoah_wb(&cgen, true, !ShenandoahWriteBarrierCsetTestInIR);
 967   }
 968 }
 969 
 970 bool ShenandoahBarrierSetAssembler::needs_explicit_null_check(intptr_t offset) {
 971   // Exception handler checks the nmethod's implicit null checks table
 972   // only when this method returns false.
 973 #ifdef _LP64
 974   if (UseCompressedOops && Universe::narrow_oop_base() != NULL) {
 975     assert (Universe::heap() != NULL, "java heap should be initialized");
 976     // The first page after heap_base is unmapped and
 977     // the 'offset' is equal to [heap_base + offset] for
 978     // narrow oop implicit null checks.
 979     uintptr_t base = (uintptr_t)Universe::narrow_oop_base();
 980     int adj = BrooksPointer::byte_offset();
 981     if ((uintptr_t)(offset - adj) >= base) {
 982       // Normalize offset for the next check.
 983       offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
 984     }
 985   }
 986 #endif
 987   if (offset == BrooksPointer::byte_offset()) {
 988     return false;
 989   }
 990   return offset < 0 || os::vm_page_size() <= offset;
 991 }
< prev index next >