From owner-svn-src-all@FreeBSD.ORG Tue Jan 24 11:48:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF3C01065677; Tue, 24 Jan 2012 11:48:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82F078FC14; Tue, 24 Jan 2012 11:48:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0OBm6UI073920; Tue, 24 Jan 2012 11:48:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0OBm6qv073917; Tue, 24 Jan 2012 11:48:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201201241148.q0OBm6qv073917@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Jan 2012 11:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230504 - in stable/9/sys: amd64/include i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2012 11:48:06 -0000 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: