github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/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 "context" 10 11 "github.com/metacubex/gvisor/pkg/state" 12 ) 13 14 func (r *Registers) StateTypeName() string { 15 return "pkg/sentry/arch.Registers" 16 } 17 18 func (r *Registers) StateFields() []string { 19 return []string{ 20 "PtraceRegs", 21 "TPIDR_EL0", 22 } 23 } 24 25 func (r *Registers) beforeSave() {} 26 27 // +checklocksignore 28 func (r *Registers) StateSave(stateSinkObject state.Sink) { 29 r.beforeSave() 30 stateSinkObject.Save(0, &r.PtraceRegs) 31 stateSinkObject.Save(1, &r.TPIDR_EL0) 32 } 33 34 func (r *Registers) afterLoad(context.Context) {} 35 36 // +checklocksignore 37 func (r *Registers) StateLoad(ctx context.Context, stateSourceObject state.Source) { 38 stateSourceObject.Load(0, &r.PtraceRegs) 39 stateSourceObject.Load(1, &r.TPIDR_EL0) 40 } 41 42 func (s *State) StateTypeName() string { 43 return "pkg/sentry/arch.State" 44 } 45 46 func (s *State) StateFields() []string { 47 return []string{ 48 "Regs", 49 "fpState", 50 "OrigR0", 51 } 52 } 53 54 func (s *State) beforeSave() {} 55 56 // +checklocksignore 57 func (s *State) StateSave(stateSinkObject state.Sink) { 58 s.beforeSave() 59 stateSinkObject.Save(0, &s.Regs) 60 stateSinkObject.Save(1, &s.fpState) 61 stateSinkObject.Save(2, &s.OrigR0) 62 } 63 64 func (s *State) afterLoad(context.Context) {} 65 66 // +checklocksignore 67 func (s *State) StateLoad(ctx context.Context, stateSourceObject state.Source) { 68 stateSourceObject.Load(0, &s.Regs) 69 stateSourceObject.LoadWait(1, &s.fpState) 70 stateSourceObject.Load(2, &s.OrigR0) 71 } 72 73 func init() { 74 state.Register((*Registers)(nil)) 75 state.Register((*State)(nil)) 76 }