github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/arch/arch_aarch64_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  //go:build arm64
     4  // +build arm64
     5  
     6  package arch
     7  
     8  import (
     9  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
    10  )
    11  
    12  func (r *Registers) StateTypeName() string {
    13  	return "pkg/sentry/arch.Registers"
    14  }
    15  
    16  func (r *Registers) StateFields() []string {
    17  	return []string{
    18  		"PtraceRegs",
    19  		"TPIDR_EL0",
    20  	}
    21  }
    22  
    23  func (r *Registers) beforeSave() {}
    24  
    25  // +checklocksignore
    26  func (r *Registers) StateSave(stateSinkObject state.Sink) {
    27  	r.beforeSave()
    28  	stateSinkObject.Save(0, &r.PtraceRegs)
    29  	stateSinkObject.Save(1, &r.TPIDR_EL0)
    30  }
    31  
    32  func (r *Registers) afterLoad() {}
    33  
    34  // +checklocksignore
    35  func (r *Registers) StateLoad(stateSourceObject state.Source) {
    36  	stateSourceObject.Load(0, &r.PtraceRegs)
    37  	stateSourceObject.Load(1, &r.TPIDR_EL0)
    38  }
    39  
    40  func (s *State) StateTypeName() string {
    41  	return "pkg/sentry/arch.State"
    42  }
    43  
    44  func (s *State) StateFields() []string {
    45  	return []string{
    46  		"Regs",
    47  		"fpState",
    48  		"OrigR0",
    49  	}
    50  }
    51  
    52  func (s *State) beforeSave() {}
    53  
    54  // +checklocksignore
    55  func (s *State) StateSave(stateSinkObject state.Sink) {
    56  	s.beforeSave()
    57  	stateSinkObject.Save(0, &s.Regs)
    58  	stateSinkObject.Save(1, &s.fpState)
    59  	stateSinkObject.Save(2, &s.OrigR0)
    60  }
    61  
    62  func (s *State) afterLoad() {}
    63  
    64  // +checklocksignore
    65  func (s *State) StateLoad(stateSourceObject state.Source) {
    66  	stateSourceObject.Load(0, &s.Regs)
    67  	stateSourceObject.LoadWait(1, &s.fpState)
    68  	stateSourceObject.Load(2, &s.OrigR0)
    69  }
    70  
    71  func init() {
    72  	state.Register((*Registers)(nil))
    73  	state.Register((*State)(nil))
    74  }