From 97406b20a1551ddc8d1884d11d81b958b829afae Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Tue, 15 Dec 2020 16:49:39 -0800 Subject: Internal change. PiperOrigin-RevId: 347720083 --- pkg/sentry/arch/arch.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pkg/sentry/arch/arch.go') diff --git a/pkg/sentry/arch/arch.go b/pkg/sentry/arch/arch.go index d75d665ae..dd2effdf9 100644 --- a/pkg/sentry/arch/arch.go +++ b/pkg/sentry/arch/arch.go @@ -365,3 +365,18 @@ func (a SyscallArgument) SizeT() uint { func (a SyscallArgument) ModeT() uint { return uint(uint16(a.Value)) } + +// ErrFloatingPoint indicates a failed restore due to unusable floating point +// state. +type ErrFloatingPoint struct { + // supported is the supported floating point state. + supported uint64 + + // saved is the saved floating point state. + saved uint64 +} + +// Error returns a sensible description of the restore error. +func (e ErrFloatingPoint) Error() string { + return fmt.Sprintf("floating point state contains unsupported features; supported: %#x saved: %#x", e.supported, e.saved) +} -- cgit v1.2.3