summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/arch/arch_amd64.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-03-24 01:53:34 +0000
committergVisor bot <gvisor-bot@google.com>2021-03-24 01:53:34 +0000
commit6d6d1361a87d19477c9f035405065fc9b714ef73 (patch)
tree72689e458f56eeb2268d4c02f7a64fdad4443cc3 /pkg/sentry/arch/arch_amd64.go
parent8e2958434d9fb2d8dc75cd3942be4c90b5c9d7d3 (diff)
parent56a9a13976ad800a8a34b194d35f0169d0a0bb23 (diff)
Merge release-20210315.0-18-g56a9a1397 (automated)
Diffstat (limited to 'pkg/sentry/arch/arch_amd64.go')
-rw-r--r--pkg/sentry/arch/arch_amd64.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/sentry/arch/arch_amd64.go b/pkg/sentry/arch/arch_amd64.go
index 15d8ddb40..2571be60f 100644
--- a/pkg/sentry/arch/arch_amd64.go
+++ b/pkg/sentry/arch/arch_amd64.go
@@ -25,6 +25,7 @@ import (
"gvisor.dev/gvisor/pkg/cpuid"
"gvisor.dev/gvisor/pkg/marshal"
"gvisor.dev/gvisor/pkg/marshal/primitive"
+ "gvisor.dev/gvisor/pkg/sentry/arch/fpu"
"gvisor.dev/gvisor/pkg/sentry/limits"
"gvisor.dev/gvisor/pkg/usermem"
)
@@ -105,7 +106,7 @@ const (
// +stateify savable
type context64 struct {
State
- sigFPState []x86FPState // fpstate to be restored on sigreturn.
+ sigFPState []fpu.State // fpstate to be restored on sigreturn.
}
// Arch implements Context.Arch.
@@ -113,14 +114,18 @@ func (c *context64) Arch() Arch {
return AMD64
}
-func (c *context64) copySigFPState() []x86FPState {
- var sigfps []x86FPState
+func (c *context64) copySigFPState() []fpu.State {
+ var sigfps []fpu.State
for _, s := range c.sigFPState {
- sigfps = append(sigfps, s.fork())
+ sigfps = append(sigfps, s.Fork())
}
return sigfps
}
+func (c *context64) FloatingPointData() *fpu.State {
+ return &c.State.fpState
+}
+
// Fork returns an exact copy of this context.
func (c *context64) Fork() Context {
return &context64{