Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/include Fill 'struct fpreg' & 'struct xmmregs' in
details: https://anonhg.NetBSD.org/src/rev/a722c00e4a1b
branches: trunk
changeset: 451219:a722c00e4a1b
user: mgorny <mgorny%NetBSD.org@localhost>
date: Fri May 10 16:27:03 2019 +0000
description:
Fill 'struct fpreg' & 'struct xmmregs' in
The 'struct fpreg' data type used by PT_GETFPREGS, and 'struct xmmregs'
used by PT_GETXMMREGS are currently opaque. Define them to contain
correct data structs instead, the same way they are defined for amd64.
For 'struct fpreg' this means 'struct save87', and for 'struct xmmregs'
this means 'struct fxsave'. This makes it more transparent for
consumers how the data is formatted, and allows using it without need
for explicit casts.
Reviewed by <kamil>.
diffstat:
sys/arch/i386/include/reg.h | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diffs (42 lines):
diff -r 5ce5f61dbbd3 -r a722c00e4a1b sys/arch/i386/include/reg.h
--- a/sys/arch/i386/include/reg.h Fri May 10 16:24:35 2019 +0000
+++ b/sys/arch/i386/include/reg.h Fri May 10 16:27:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: reg.h,v 1.20 2017/02/23 03:34:22 kamil Exp $ */
+/* $NetBSD: reg.h,v 1.21 2019/05/10 16:27:03 mgorny Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -37,6 +37,7 @@
#ifndef _I386_REG_H_
#define _I386_REG_H_
+#include <x86/fpu.h>
#include <machine/frame.h>
/*
@@ -92,20 +93,14 @@
};
struct fpreg {
- /*
- * XXX
- * Fill this in with real info.
- */
- char __data[108];
+ struct save87 fstate;
};
+__CTASSERT(sizeof(struct fpreg) == 108);
struct xmmregs {
- /*
- * XXX
- * Fill this in with real info.
- */
- char __data[512];
+ struct fxsave fxstate;
};
+__CTASSERT(sizeof(struct xmmregs) == 512);
/*
* Debug Registers
Home |
Main Index |
Thread Index |
Old Index