// automatically generated by stateify.

//go:build (amd64 || 386) && (amd64 || 386)
// +build amd64 386
// +build amd64 386

package arch

import (
	"context"

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

func (r *Registers) StateTypeName() string {
	return "pkg/sentry/arch.Registers"
}

func (r *Registers) StateFields() []string {
	return []string{
		"PtraceRegs",
	}
}

func (r *Registers) beforeSave() {}

// +checklocksignore
func (r *Registers) StateSave(stateSinkObject state.Sink) {
	r.beforeSave()
	stateSinkObject.Save(0, &r.PtraceRegs)
}

func (r *Registers) afterLoad(context.Context) {}

// +checklocksignore
func (r *Registers) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &r.PtraceRegs)
}

func init() {
	state.Register((*Registers)(nil))
}
