File: cpuid_amd64_state_autogen.go

package info (click to toggle)
golang-gvisor-gvisor 0.0~20221219.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 17,136 kB
  • sloc: asm: 2,860; cpp: 348; python: 89; sh: 40; makefile: 34; ansic: 21
file content (105 lines) | stat: -rw-r--r-- 2,106 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// automatically generated by stateify.

//go:build amd64 && amd64 && amd64 && amd64
// +build amd64,amd64,amd64,amd64

package cpuid

import (
	"gvisor.dev/gvisor/pkg/state"
)

func (fs *FeatureSet) StateTypeName() string {
	return "pkg/cpuid.FeatureSet"
}

func (fs *FeatureSet) StateFields() []string {
	return []string{
		"Function",
	}
}

func (fs *FeatureSet) beforeSave() {}

// +checklocksignore
func (fs *FeatureSet) StateSave(stateSinkObject state.Sink) {
	fs.beforeSave()
	var FunctionValue Static
	FunctionValue = fs.saveFunction()
	stateSinkObject.SaveValue(0, FunctionValue)
}

func (fs *FeatureSet) afterLoad() {}

// +checklocksignore
func (fs *FeatureSet) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.LoadValue(0, new(Static), func(y any) { fs.loadFunction(y.(Static)) })
}

func (i *In) StateTypeName() string {
	return "pkg/cpuid.In"
}

func (i *In) StateFields() []string {
	return []string{
		"Eax",
		"Ecx",
	}
}

func (i *In) beforeSave() {}

// +checklocksignore
func (i *In) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.Eax)
	stateSinkObject.Save(1, &i.Ecx)
}

func (i *In) afterLoad() {}

// +checklocksignore
func (i *In) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.Eax)
	stateSourceObject.Load(1, &i.Ecx)
}

func (o *Out) StateTypeName() string {
	return "pkg/cpuid.Out"
}

func (o *Out) StateFields() []string {
	return []string{
		"Eax",
		"Ebx",
		"Ecx",
		"Edx",
	}
}

func (o *Out) beforeSave() {}

// +checklocksignore
func (o *Out) StateSave(stateSinkObject state.Sink) {
	o.beforeSave()
	stateSinkObject.Save(0, &o.Eax)
	stateSinkObject.Save(1, &o.Ebx)
	stateSinkObject.Save(2, &o.Ecx)
	stateSinkObject.Save(3, &o.Edx)
}

func (o *Out) afterLoad() {}

// +checklocksignore
func (o *Out) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &o.Eax)
	stateSourceObject.Load(1, &o.Ebx)
	stateSourceObject.Load(2, &o.Ecx)
	stateSourceObject.Load(3, &o.Edx)
}

func init() {
	state.Register((*FeatureSet)(nil))
	state.Register((*In)(nil))
	state.Register((*Out)(nil))
}