< prev index next >

src/share/vm/c1/c1_LIR.hpp

Print this page

        

@@ -869,10 +869,13 @@
 class    LIR_Op1;
 class      LIR_OpBranch;
 class      LIR_OpConvert;
 class      LIR_OpAllocObj;
 class      LIR_OpRoundFP;
+#if INCLUDE_ALL_GCS
+class      LIR_OpShenandoahWriteBarrier;
+#endif
 class    LIR_Op2;
 class    LIR_OpDelay;
 class    LIR_Op3;
 class      LIR_OpAllocArray;
 class    LIR_OpCall;

@@ -935,10 +938,11 @@
       , lir_roundfp
       , lir_safepoint
       , lir_pack64
       , lir_unpack64
       , lir_unwind
+      , lir_shenandoah_wb
   , end_op1
   , begin_op2
       , lir_cmp
       , lir_cmp_l2i
       , lir_ucmp_fd2i

@@ -1149,10 +1153,13 @@
   virtual LIR_OpUpdateCRC32* as_OpUpdateCRC32() { return NULL; }
   virtual LIR_OpTypeCheck* as_OpTypeCheck() { return NULL; }
   virtual LIR_OpCompareAndSwap* as_OpCompareAndSwap() { return NULL; }
   virtual LIR_OpProfileCall* as_OpProfileCall() { return NULL; }
   virtual LIR_OpProfileType* as_OpProfileType() { return NULL; }
+#if INCLUDE_ALL_GCS
+  virtual LIR_OpShenandoahWriteBarrier* as_OpShenandoahWriteBarrier() { return NULL; }
+#endif
 #ifdef ASSERT
   virtual LIR_OpAssert* as_OpAssert() { return NULL; }
 #endif
 
   virtual void verify() const {}

@@ -1463,10 +1470,28 @@
   virtual void emit_code(LIR_Assembler* masm);
   virtual LIR_OpBranch* as_OpBranch() { return this; }
   virtual void print_instr(outputStream* out) const PRODUCT_RETURN;
 };
 
+#if INCLUDE_ALL_GCS
+class LIR_OpShenandoahWriteBarrier : public LIR_Op1 {
+ friend class LIR_OpVisitState;
+
+private:
+  bool _need_null_check;
+
+public:
+  LIR_OpShenandoahWriteBarrier(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info, bool need_null_check) : LIR_Op1(lir_shenandoah_wb, obj, result, T_OBJECT, lir_patch_none, info), _need_null_check(need_null_check) {
+    assert(UseShenandoahGC && ShenandoahWriteBarrier, "should be enabled");
+  }
+  bool need_null_check() const { return _need_null_check; }
+  virtual void emit_code(LIR_Assembler* masm);
+  virtual LIR_OpShenandoahWriteBarrier* as_OpShenandoahWriteBarrier() { return this; }
+  virtual void print_instr(outputStream* out) const PRODUCT_RETURN;
+
+};
+#endif
 
 class ConversionStub;
 
 class LIR_OpConvert: public LIR_Op1 {
  friend class LIR_OpVisitState;

@@ -2151,10 +2176,14 @@
   }
 #else
   void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, ConversionStub* stub = NULL/*, bool is_32bit = false*/) { append(new LIR_OpConvert(code, left, dst, stub)); }
 #endif
 
+#if INCLUDE_ALL_GCS
+  void shenandoah_wb(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info, bool need_null_check) { append(new LIR_OpShenandoahWriteBarrier(obj, result, info, need_null_check)); }
+#endif
+
   void logical_and (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_and,  left, right, dst)); }
   void logical_or  (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or,   left, right, dst)); }
   void logical_xor (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_xor,  left, right, dst)); }
 
   void   pack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_pack64,   src, dst, T_LONG, lir_patch_none, NULL)); }
< prev index next >