github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/cpuid/cpuid_amd64_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 //go:build amd64 && amd64 && amd64 && amd64 4 // +build amd64,amd64,amd64,amd64 5 6 package cpuid 7 8 import ( 9 "github.com/ttpreport/gvisor-ligolo/pkg/state" 10 ) 11 12 func (fs *FeatureSet) StateTypeName() string { 13 return "pkg/cpuid.FeatureSet" 14 } 15 16 func (fs *FeatureSet) StateFields() []string { 17 return []string{ 18 "Function", 19 "hwCap", 20 } 21 } 22 23 func (fs *FeatureSet) beforeSave() {} 24 25 // +checklocksignore 26 func (fs *FeatureSet) StateSave(stateSinkObject state.Sink) { 27 fs.beforeSave() 28 var FunctionValue Static 29 FunctionValue = fs.saveFunction() 30 stateSinkObject.SaveValue(0, FunctionValue) 31 stateSinkObject.Save(1, &fs.hwCap) 32 } 33 34 func (fs *FeatureSet) afterLoad() {} 35 36 // +checklocksignore 37 func (fs *FeatureSet) StateLoad(stateSourceObject state.Source) { 38 stateSourceObject.Load(1, &fs.hwCap) 39 stateSourceObject.LoadValue(0, new(Static), func(y any) { fs.loadFunction(y.(Static)) }) 40 } 41 42 func (i *In) StateTypeName() string { 43 return "pkg/cpuid.In" 44 } 45 46 func (i *In) StateFields() []string { 47 return []string{ 48 "Eax", 49 "Ecx", 50 } 51 } 52 53 func (i *In) beforeSave() {} 54 55 // +checklocksignore 56 func (i *In) StateSave(stateSinkObject state.Sink) { 57 i.beforeSave() 58 stateSinkObject.Save(0, &i.Eax) 59 stateSinkObject.Save(1, &i.Ecx) 60 } 61 62 func (i *In) afterLoad() {} 63 64 // +checklocksignore 65 func (i *In) StateLoad(stateSourceObject state.Source) { 66 stateSourceObject.Load(0, &i.Eax) 67 stateSourceObject.Load(1, &i.Ecx) 68 } 69 70 func (o *Out) StateTypeName() string { 71 return "pkg/cpuid.Out" 72 } 73 74 func (o *Out) StateFields() []string { 75 return []string{ 76 "Eax", 77 "Ebx", 78 "Ecx", 79 "Edx", 80 } 81 } 82 83 func (o *Out) beforeSave() {} 84 85 // +checklocksignore 86 func (o *Out) StateSave(stateSinkObject state.Sink) { 87 o.beforeSave() 88 stateSinkObject.Save(0, &o.Eax) 89 stateSinkObject.Save(1, &o.Ebx) 90 stateSinkObject.Save(2, &o.Ecx) 91 stateSinkObject.Save(3, &o.Edx) 92 } 93 94 func (o *Out) afterLoad() {} 95 96 // +checklocksignore 97 func (o *Out) StateLoad(stateSourceObject state.Source) { 98 stateSourceObject.Load(0, &o.Eax) 99 stateSourceObject.Load(1, &o.Ebx) 100 stateSourceObject.Load(2, &o.Ecx) 101 stateSourceObject.Load(3, &o.Edx) 102 } 103 104 func init() { 105 state.Register((*FeatureSet)(nil)) 106 state.Register((*In)(nil)) 107 state.Register((*Out)(nil)) 108 }