Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2012 11:48:06 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r230504 - in stable/9/sys: amd64/include i386/include
Message-ID:  <201201241148.q0OBm6qv073917@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Jan 24 11:48:06 2012
New Revision: 230504
URL: http://svn.freebsd.org/changeset/base/230504

Log:
  MFC r230270:
  Add definitions for the FPU extended state header, legacy extended
  state and AVX state.

Modified:
  stable/9/sys/amd64/include/fpu.h
  stable/9/sys/i386/include/npx.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/include/fpu.h
==============================================================================
--- stable/9/sys/amd64/include/fpu.h	Tue Jan 24 11:42:46 2012	(r230503)
+++ stable/9/sys/amd64/include/fpu.h	Tue Jan 24 11:48:06 2012	(r230504)
@@ -78,6 +78,28 @@ struct  savefpu {
 	uint8_t sv_pad[96];
 } __aligned(16);
 
+struct xstate_hdr {
+	uint64_t xstate_bv;
+	uint8_t xstate_rsrv0[16];
+	uint8_t	xstate_rsrv[40];
+};
+
+struct savefpu_xstate {
+	struct xstate_hdr sx_hd;
+	struct ymmacc	sx_ymm[16];
+};
+
+struct savefpu_ymm {
+	struct	envxmm	sv_env;
+	struct {
+		struct fpacc87	fp_acc;
+		int8_t		fp_pad[6];      /* padding */
+	} sv_fp[8];
+	struct xmmacc	sv_xmm[16];
+	uint8_t sv_pad[96];
+	struct savefpu_xstate sv_xstate;
+} __aligned(64);
+
 #ifdef _KERNEL
 struct fpu_kern_ctx {
 	struct savefpu hwstate;

Modified: stable/9/sys/i386/include/npx.h
==============================================================================
--- stable/9/sys/i386/include/npx.h	Tue Jan 24 11:42:46 2012	(r230503)
+++ stable/9/sys/i386/include/npx.h	Tue Jan 24 11:48:06 2012	(r230504)
@@ -101,6 +101,11 @@ struct  xmmacc {
 	u_char	xmm_bytes[16];
 };
 
+/* Contents of the upper 16 bytes of each AVX extended accumulator */
+struct  ymmacc {
+	uint8_t  ymm_bytes[16];
+};
+
 struct  savexmm {
 	struct	envxmm	sv_env;
 	struct {
@@ -116,6 +121,28 @@ union	savefpu {
 	struct	savexmm	sv_xmm;
 };
 
+struct xstate_hdr {
+	uint64_t xstate_bv;
+	uint8_t xstate_rsrv0[16];
+	uint8_t	xstate_rsrv[40];
+};
+
+struct savexmm_xstate {
+	struct xstate_hdr sx_hd;
+	struct ymmacc	sx_ymm[16];
+};
+
+struct savexmm_ymm {
+	struct	envxmm	sv_env;
+	struct {
+		struct fpacc87	fp_acc;
+		int8_t		fp_pad[6];      /* padding */
+	} sv_fp[8];
+	struct xmmacc	sv_xmm[16];
+	uint8_t sv_pad[96];
+	struct savexmm_xstate sv_xstate;
+} __aligned(64);
+
 /*
  * The hardware default control word for i387's and later coprocessors is
  * 0x37F, giving:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201241148.q0OBm6qv073917>