< prev index next >

src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp

Print this page
@@ -313,10 +313,11 @@
  class ZSaveLiveRegisters {
  private:
    MacroAssembler* const _masm;
    RegSet                _gp_regs;
    FloatRegSet           _fp_regs;
+   PRegSet               _p_regs;
  
  public:
    void initialize(ZLoadBarrierStubC2* stub) {
      // Record registers that needs to be saved/restored
      RegMaskIterator rmi(stub->live());

@@ -326,10 +327,12 @@
          const VMReg vm_reg = OptoReg::as_VMReg(opto_reg);
          if (vm_reg->is_Register()) {
            _gp_regs += RegSet::of(vm_reg->as_Register());
          } else if (vm_reg->is_FloatRegister()) {
            _fp_regs += FloatRegSet::of(vm_reg->as_FloatRegister());
+         } else if (vm_reg->is_PRegister()) {
+           _p_regs += PRegSet::of(vm_reg->as_PRegister());
          } else {
            fatal("Unknown register type");
          }
        }
      }

@@ -339,22 +342,25 @@
    }
  
    ZSaveLiveRegisters(MacroAssembler* masm, ZLoadBarrierStubC2* stub) :
        _masm(masm),
        _gp_regs(),
-       _fp_regs() {
+       _fp_regs(),
+       _p_regs() {
  
      // Figure out what registers to save/restore
      initialize(stub);
  
      // Save registers
      __ push(_gp_regs, sp);
      __ push_fp(_fp_regs, sp);
+     __ push_p(_p_regs, sp);
    }
  
    ~ZSaveLiveRegisters() {
      // Restore registers
+     __ pop_p(_p_regs, sp);
      __ pop_fp(_fp_regs, sp);
  
      // External runtime call may clobber ptrue reg
      __ reinitialize_ptrue();
  
< prev index next >