< prev index next >

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Print this page
rev 50905 : Move Shenandoah stubs generation into ShenandoahBarrierSetAssembler
rev 50906 : [mq]: stubgen-v2.patch


  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include <sys/types.h>
  27 
  28 #include "precompiled.hpp"
  29 #include "jvm.h"
  30 #include "asm/assembler.hpp"
  31 #include "asm/assembler.inline.hpp"
  32 #include "gc/shared/barrierSet.hpp"
  33 #include "gc/shared/cardTable.hpp"
  34 #include "gc/shared/barrierSetAssembler.hpp"
  35 #include "gc/shared/cardTableBarrierSet.hpp"
  36 #include "interpreter/interpreter.hpp"
  37 #include "compiler/disassembler.hpp"
  38 #include "gc/shared/collectedHeap.hpp"
  39 #include "gc/shenandoah/brooksPointer.hpp"

  40 #include "gc/shenandoah/shenandoahHeap.hpp"
  41 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  42 #include "gc/shenandoah/shenandoahHeapRegion.hpp"
  43 #include "memory/resourceArea.hpp"
  44 #include "nativeInst_aarch64.hpp"
  45 #include "oops/accessDecorators.hpp"
  46 #include "oops/compressedOops.inline.hpp"
  47 #include "oops/klass.inline.hpp"
  48 #include "oops/oop.hpp"
  49 #include "opto/compile.hpp"
  50 #include "opto/intrinsicnode.hpp"
  51 #include "opto/node.hpp"
  52 #include "runtime/biasedLocking.hpp"
  53 #include "runtime/icache.hpp"
  54 #include "runtime/interfaceSupport.inline.hpp"
  55 #include "runtime/jniHandles.inline.hpp"
  56 #include "runtime/sharedRuntime.hpp"
  57 #include "runtime/thread.hpp"
  58 
  59 #ifdef PRODUCT


4078 
4079   // Check for heap stability
4080   cbz(rscratch1, done);
4081 
4082   // Heap is unstable, need to perform the read-barrier even if WB is inactive
4083   if (ShenandoahWriteBarrierRB) {
4084     ldr(dst, Address(dst, BrooksPointer::byte_offset()));
4085   }
4086 
4087   // Check for evacuation-in-progress and jump to WB slow-path if needed
4088   mov(rscratch2, ShenandoahHeap::EVACUATION | ShenandoahHeap::TRAVERSAL);
4089   tst(rscratch1, rscratch2);
4090   br(Assembler::EQ, done);
4091 
4092   RegSet to_save = RegSet::of(r0);
4093   if (dst != r0) {
4094     push(to_save, sp);
4095     mov(r0, dst);
4096   }
4097 
4098   assert(StubRoutines::aarch64::shenandoah_wb() != NULL, "need write barrier stub");
4099   far_call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::aarch64::shenandoah_wb())));
4100 
4101   if (dst != r0) {
4102     mov(dst, r0);
4103     pop(to_save, sp);
4104   }
4105   block_comment("} Shenandoah write barrier");
4106 
4107   bind(done);
4108 }
4109 #endif // INCLUDE_SHENANDOAHGC
4110 
4111 Address MacroAssembler::allocate_metadata_address(Metadata* obj) {
4112   assert(oop_recorder() != NULL, "this assembler needs a Recorder");
4113   int index = oop_recorder()->allocate_metadata_index(obj);
4114   RelocationHolder rspec = metadata_Relocation::spec(index);
4115   return Address((address)obj, rspec);
4116 }
4117 
4118 // Move an oop into a register.  immediate is true if we want
4119 // immediate instrcutions, i.e. we are not going to patch this




  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include <sys/types.h>
  27 
  28 #include "precompiled.hpp"
  29 #include "jvm.h"
  30 #include "asm/assembler.hpp"
  31 #include "asm/assembler.inline.hpp"
  32 #include "gc/shared/barrierSet.hpp"
  33 #include "gc/shared/cardTable.hpp"
  34 #include "gc/shared/barrierSetAssembler.hpp"
  35 #include "gc/shared/cardTableBarrierSet.hpp"
  36 #include "interpreter/interpreter.hpp"
  37 #include "compiler/disassembler.hpp"
  38 #include "gc/shared/collectedHeap.hpp"
  39 #include "gc/shenandoah/brooksPointer.hpp"
  40 #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
  41 #include "gc/shenandoah/shenandoahHeap.hpp"
  42 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  43 #include "gc/shenandoah/shenandoahHeapRegion.hpp"
  44 #include "memory/resourceArea.hpp"
  45 #include "nativeInst_aarch64.hpp"
  46 #include "oops/accessDecorators.hpp"
  47 #include "oops/compressedOops.inline.hpp"
  48 #include "oops/klass.inline.hpp"
  49 #include "oops/oop.hpp"
  50 #include "opto/compile.hpp"
  51 #include "opto/intrinsicnode.hpp"
  52 #include "opto/node.hpp"
  53 #include "runtime/biasedLocking.hpp"
  54 #include "runtime/icache.hpp"
  55 #include "runtime/interfaceSupport.inline.hpp"
  56 #include "runtime/jniHandles.inline.hpp"
  57 #include "runtime/sharedRuntime.hpp"
  58 #include "runtime/thread.hpp"
  59 
  60 #ifdef PRODUCT


4079 
4080   // Check for heap stability
4081   cbz(rscratch1, done);
4082 
4083   // Heap is unstable, need to perform the read-barrier even if WB is inactive
4084   if (ShenandoahWriteBarrierRB) {
4085     ldr(dst, Address(dst, BrooksPointer::byte_offset()));
4086   }
4087 
4088   // Check for evacuation-in-progress and jump to WB slow-path if needed
4089   mov(rscratch2, ShenandoahHeap::EVACUATION | ShenandoahHeap::TRAVERSAL);
4090   tst(rscratch1, rscratch2);
4091   br(Assembler::EQ, done);
4092 
4093   RegSet to_save = RegSet::of(r0);
4094   if (dst != r0) {
4095     push(to_save, sp);
4096     mov(r0, dst);
4097   }
4098 
4099   far_call(RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahBarrierSetAssembler::shenandoah_wb())));

4100 
4101   if (dst != r0) {
4102     mov(dst, r0);
4103     pop(to_save, sp);
4104   }
4105   block_comment("} Shenandoah write barrier");
4106 
4107   bind(done);
4108 }
4109 #endif // INCLUDE_SHENANDOAHGC
4110 
4111 Address MacroAssembler::allocate_metadata_address(Metadata* obj) {
4112   assert(oop_recorder() != NULL, "this assembler needs a Recorder");
4113   int index = oop_recorder()->allocate_metadata_index(obj);
4114   RelocationHolder rspec = metadata_Relocation::spec(index);
4115   return Address((address)obj, rspec);
4116 }
4117 
4118 // Move an oop into a register.  immediate is true if we want
4119 // immediate instrcutions, i.e. we are not going to patch this


< prev index next >