Index: /trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk	(revision 61314)
+++ /trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk	(revision 61315)
@@ -250,5 +250,24 @@
 	$$(bs3-cpu-basic-2_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o64 \
 	$$(bs3-cpu-basic-2_0_OUTDIR)/bs3-cpu-basic-2-asm.o16
-endif
+
+# FPU state corruption checker.
+MISCBINS += bs3-fpustate-1
+bs3-fpustate-1_TEMPLATE = VBoxBS3KitImg
+bs3-fpustate-1_INCS  = .
+bs3-fpustate-1_DEFS  =  BS3_CMN_INSTANTIATE_FILE1=bs3-fpustate-1-template.c
+bs3-fpustate-1_DEFS += BS3_MODE_INSTANTIATE_FILE1=bs3-fpustate-1-template.c
+bs3-fpustate-1_SOURCES = \
+	bs3kit/bs3-first-rm.asm \
+	bs3-fpustate-1.c \
+       bs3kit/bs3-cmn-instantiate.c16 \
+       bs3kit/bs3-cmn-instantiate.c32 \
+       bs3kit/bs3-cmn-instantiate.c64 \
+	bs3-fpustate-1-asm.asm
+bs3-fpustate-1-template.o:: \
+	$$(bs3-fpustate-1_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o16 \
+	$$(bs3-fpustate-1_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o32 \
+	$$(bs3-fpustate-1_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o64 \
+
+endif # VBOX_WITH_BS3KIT
 
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-asm.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-asm.asm	(revision 61315)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-asm.asm	(revision 61315)
@@ -0,0 +1,162 @@
+; $Id$
+;; @file
+; BS3Kit - bs3-fpustate-1, assembly helpers and template instantiation.
+;
+
+;
+; Copyright (C) 2007-2016 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+
+;*********************************************************************************************************************************
+;*  Header Files                                                                                                                 *
+;*********************************************************************************************************************************
+%include "bs3kit.mac"
+
+
+;*********************************************************************************************************************************
+;*  Global Variables                                                                                                             *
+;*********************************************************************************************************************************
+BS3_BEGIN_DATA16
+;; @name Floating point constants.
+; @{
+g_r32_0dot1:    dd 0.1
+g_r32_3dot2:    dd 3.2
+g_r32_Zero:     dd 0.0
+g_r32_One:      dd 1.0
+g_r32_Two:      dd 2.0
+g_r32_Three:    dd 3.0
+g_r32_Ten:      dd 10.0
+g_r32_Eleven:   dd 11.0
+g_r32_ThirtyTwo:dd 32.0
+g_r32_Min:      dd 000800000h
+g_r32_Max:      dd 07f7fffffh
+g_r32_Inf:      dd 07f800000h
+g_r32_SNaN:     dd 07f800001h
+g_r32_SNaNMax:  dd 07fbfffffh
+g_r32_QNaN:     dd 07fc00000h
+g_r32_QNaNMax:  dd 07fffffffh
+g_r32_NegQNaN:  dd 0ffc00000h
+
+g_r64_0dot1:    dq 0.1
+g_r64_6dot9:    dq 6.9
+g_r64_Zero:     dq 0.0
+g_r64_One:      dq 1.0
+g_r64_Two:      dq 2.0
+g_r64_Three:    dq 3.0
+g_r64_Ten:      dq 10.0
+g_r64_Eleven:   dq 11.0
+g_r64_ThirtyTwo:dq 32.0
+g_r64_Min:      dq 00010000000000000h
+g_r64_Max:      dq 07fefffffffffffffh
+g_r64_Inf:      dq 07ff0000000000000h
+g_r64_SNaN:     dq 07ff0000000000001h
+g_r64_SNaNMax:  dq 07ff7ffffffffffffh
+g_r64_NegQNaN:  dq 0fff8000000000000h
+g_r64_QNaN:     dq 07ff8000000000000h
+g_r64_QNaNMax:  dq 07fffffffffffffffh
+g_r64_DnMin:    dq 00000000000000001h
+g_r64_DnMax:    dq 0000fffffffffffffh
+
+
+g_r80_0dot1:    dt 0.1
+g_r80_3dot2:    dt 3.2
+g_r80_Zero:     dt 0.0
+g_r80_One:      dt 1.0
+g_r80_Two:      dt 2.0
+g_r80_Three:    dt 3.0
+g_r80_Ten:      dt 10.0
+g_r80_Eleven:   dt 11.0
+g_r80_ThirtyTwo:dt 32.0
+%ifdef __NASM__
+g_r80_Min:      dq 08000000000000000h
+                dw 00001h
+g_r80_Max:      dq     0ffffffffffffffffh
+                dw 07ffeh
+g_r80_Inf:      dq     08000000000000000h
+                dw 07fffh
+g_r80_QNaN:     dq     0c000000000000000h
+                dw 07fffh
+g_r80_QNaNMax:  dq     0ffffffffffffffffh
+                dw 07fffh
+g_r80_NegQNaN:  dq     0c000000000000000h
+                dw 0ffffh
+g_r80_SNaN:     dq     08000000000000001h
+                dw 07fffh
+g_r80_SNaNMax:  dq     0bfffffffffffffffh
+                dw 07fffh
+g_r80_DnMin:    dq     00000000000000001h
+                dw 00000h
+g_r80_DnMax:    dq     07fffffffffffffffh
+                dw 00000h
+%else
+g_r80_Min:      dt 000018000000000000000h
+g_r80_Max:      dt 07ffeffffffffffffffffh
+g_r80_Inf:      dt 07fff8000000000000000h
+g_r80_QNaN:     dt 07fffc000000000000000h
+g_r80_QNaNMax:  dt 07fffffffffffffffffffh
+g_r80_NegQNaN:  dt 0ffffc000000000000000h
+g_r80_SNaN:     dt 07fff8000000000000001h
+g_r80_SNaNMax:  dt 07fffbfffffffffffffffh
+g_r80_DnMin:    dt 000000000000000000001h
+g_r80_DnMax:    dt 000007fffffffffffffffh
+%endif
+
+g_r32V1:        dd 3.2
+g_r32V2:        dd -1.9
+g_r64V1:        dq 6.4
+g_r80V1:        dt 8.0
+
+; Denormal numbers.
+g_r32D0:        dd 000200000h
+;; @}
+
+;; @name Upconverted Floating point constants
+; @{
+;g_r80_r32_0dot1:        dt 0.1
+%ifdef __NASM__
+g_r80_r32_3dot2:        dq     0cccccd0000000000h
+                        dw 04000h
+%else
+g_r80_r32_3dot2:        dt 04000cccccd0000000000h
+%endif
+;g_r80_r32_Zero:         dt 0.0
+;g_r80_r32_One:          dt 1.0
+;g_r80_r32_Two:          dt 2.0
+;g_r80_r32_Three:        dt 3.0
+;g_r80_r32_Ten:          dt 10.0
+;g_r80_r32_Eleven:       dt 11.0
+;g_r80_r32_ThirtyTwo:    dt 32.0
+;; @}
+
+;; @name Decimal constants.
+; @{
+g_u64Zero:      dd 0
+g_u32Zero:      dw 0
+g_u64Two:       dd 2
+g_u32Two:       dw 2
+;; @}
+
+
+;
+; Instantiate code templates.
+;
+BS3_INSTANTIATE_TEMPLATE_ESSENTIALS      "bs3-fpustate-1-template.mac"
+
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-template.c
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-template.c	(revision 61315)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-template.c	(revision 61315)
@@ -0,0 +1,108 @@
+/* $Id$ */
+/** @file
+ * BS3Kit - bs3-fpustate-1, C code template.
+ */
+
+/*
+ * Copyright (C) 2007-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
+
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
+
+
+#ifdef BS3_INSTANTIATING_CMN
+
+///**
+// * Wrapper around Bs3TestFailedF that prefixes the error with g_usBs3TestStep
+// * and g_pszTestMode.
+// */
+//# define bs3CpuBasic2_FailedF BS3_CMN_NM(bs3CpuBasic2_FailedF)
+//BS3_DECL_NEAR(void) bs3CpuBasic2_FailedF(const char *pszFormat, ...)
+//{
+//}
+
+#endif /* BS3_INSTANTIATING_CMN */
+
+
+/*
+ * Mode specific code.
+ * Mode specific code.
+ * Mode specific code.
+ */
+#ifdef BS3_INSTANTIATING_MODE
+# if TMPL_MODE == BS3_MODE_PE32 \
+  || TMPL_MODE == BS3_MODE_PP32 \
+  || TMPL_MODE == BS3_MODE_PAE32 \
+  || TMPL_MODE == BS3_MODE_LM64
+//  || TMPL_MODE == BS3_MODE_RM
+
+BS3_DECL_NEAR(void) TMPL_NM(bs3FpuState1_InitState)(X86FXSTATE BS3_FAR *pFxState);
+BS3_DECL_NEAR(void) TMPL_NM(bs3FpuState1_Restore)(X86FXSTATE const BS3_FAR *pFxState);
+BS3_DECL_NEAR(void) TMPL_NM(bs3FpuState1_Save)(X86FXSTATE BS3_FAR *pFxState);
+
+BS3_DECL_FAR(uint8_t) TMPL_NM(bs3FpuState1_Corruption)(uint8_t bMode)
+{
+    /* We don't need to test that many modes, probably.  */
+
+    uint8_t             abBuf[sizeof(X86FXSTATE)*2 + 32];
+    uint8_t BS3_FAR    *pbTmp = &abBuf[0x10 - (((uintptr_t)abBuf) & 0x0f)];
+    X86FXSTATE BS3_FAR *pExpected = (X86FXSTATE BS3_FAR *)pbTmp;
+    X86FXSTATE BS3_FAR *pChecking = pExpected + 1;
+    uint32_t            iLoops;
+
+    /** @todo flexible wrt fxsave support? do we care?  */
+    /* First, make 100% sure we don't trap accessing the FPU state and that we can use fxsave/fxrstor. */
+    g_usBs3TestStep = 1;
+    ASMSetCR0((ASMGetCR0() & ~(X86_CR0_TS | X86_CR0_EM)) | X86_CR0_MP);
+    ASMSetCR4(ASMGetCR4() | X86_CR4_OSFXSR /*| X86_CR4_OSXMMEEXCPT*/);
+
+    /* Second, come up with a distinct state. We do that from assembly. */
+    g_usBs3TestStep = 2;
+    Bs3MemSet(abBuf, 0x42, sizeof(abBuf));
+    TMPL_NM(bs3FpuState1_InitState)(pExpected);
+
+    /* Check that we can keep it consistent for a while. */
+    g_usBs3TestStep = 3;
+    for (iLoops = 0; iLoops < _4M; iLoops++) /** @todo adjust counter. will hardcode for now and do timers later so day... */
+    {
+        TMPL_NM(bs3FpuState1_Save)(pChecking);
+        if (Bs3MemCmp(pExpected, pChecking, sizeof(*pExpected)) != 0)
+        {
+            Bs3TestFailedF("State differs after %RU32 save loops\n", iLoops);
+            return 1;
+        }
+    }
+
+    return 0;
+}
+# endif
+#endif /* BS3_INSTANTIATING_MODE */
+
+
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-template.mac
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-template.mac	(revision 61315)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-template.mac	(revision 61315)
@@ -0,0 +1,184 @@
+; $Id$
+;; @file
+; BS3Kit - bs3-fpustate-1, assembly template.
+;
+
+;
+; Copyright (C) 2007-2016 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+
+;*********************************************************************************************************************************
+;*  Header Files                                                                                                                 *
+;*********************************************************************************************************************************
+%include "bs3kit-template-header.mac"   ; setup environment
+
+
+;*********************************************************************************************************************************
+;*  External Symbols                                                                                                             *
+;*********************************************************************************************************************************
+TMPL_BEGIN_TEXT
+
+
+;;
+; Initializes the FPU state and saves it to pFxState.
+;
+; BS3_DECL_NEAR(void) TMPL_NM(bs3FpuState1_InitState)(X86FXSTATE BS3_FAR *pFxState);
+;
+BS3_PROC_BEGIN_MODE bs3FpuState1_InitState, BS3_PBC_NEAR
+        BS3_CALL_CONV_PROLOG 1
+        push    xBP
+        mov     xBP, xSP
+        push    xBX
+TONLY16 push    ds
+        pushf
+
+        ;
+        ; x87 state.
+        ;
+        fninit
+        fld dword [TMPL_DATA16_WRT(g_r32V1)]
+        fld qword [TMPL_DATA16_WRT(g_r64V1)]
+        fld tword [TMPL_DATA16_WRT(g_r80V1)]
+        fld qword [TMPL_DATA16_WRT(g_r64V1)]
+        fld dword [TMPL_DATA16_WRT(g_r32V2)]
+        fld dword [TMPL_DATA16_WRT(g_r80_QNaNMax)]
+        fld tword [TMPL_DATA16_WRT(g_r80_ThirtyTwo)]
+        fld tword [TMPL_DATA16_WRT(g_r80_SNaNMax)]
+        ;; @todo status regs
+
+
+        ;
+        ; SSE state
+        ;
+        movdqu  xmm0, [TMPL_DATA16_WRT(g_r32_0dot1)]
+        movdqu  xmm1, [TMPL_DATA16_WRT(g_r32_Two)]
+        movdqu  xmm2, [TMPL_DATA16_WRT(g_r32_ThirtyTwo)]
+        movdqu  xmm3, [TMPL_DATA16_WRT(g_r32_ThirtyTwo)]
+        movdqu  xmm4, [TMPL_DATA16_WRT(g_r32_SNaN)]
+        movdqu  xmm5, [TMPL_DATA16_WRT(g_r32_NegQNaN)]
+        movdqu  xmm6, [TMPL_DATA16_WRT(g_r64_Zero)]
+        movdqu  xmm7, [TMPL_DATA16_WRT(g_r64_Two)]
+%if TMPL_BITS == 64
+        movdqu  xmm8, [TMPL_DATA16_WRT(g_r64_Ten)]
+        movdqu  xmm9, [TMPL_DATA16_WRT(g_r64_ThirtyTwo)]
+        movdqu  xmm10, [TMPL_DATA16_WRT(g_r64_Max)]
+        movdqu  xmm11, [TMPL_DATA16_WRT(g_r64_SNaN)]
+        movdqu  xmm12, [TMPL_DATA16_WRT(g_r64_NegQNaN)]
+        movdqu  xmm13, [TMPL_DATA16_WRT(g_r64_QNaNMax)]
+        movdqu  xmm14, [TMPL_DATA16_WRT(g_r64_DnMax)]
+        movdqu  xmm15, [TMPL_DATA16_WRT(g_r80_Eleven)]
+%endif
+
+        ;; @todo status regs
+
+        ;
+        ; Save it.  Note that DS is no longer valid in 16-bit code.
+        ; To be on the safe side, we load and save the state once again.
+        ;
+TONLY16 mov     ds, [xBP + xCB + cbCurRetAddr + 2]
+        mov     xBX, [xBP + xCB + cbCurRetAddr]
+        cli
+%if TMPL_BITS == 64
+        o64 fxsave [xBX]
+        fninit
+        o64 fxrstor [xBX]
+        o64 fxsave [xBX]
+%else
+        fxsave  [xBX]
+        fninit
+        fxrstor [xBX]
+        fxsave  [xBX]
+%endif
+
+.return:
+        popf
+TONLY16 pop     ds
+        pop     xBX
+        mov     xSP, xBP
+        pop     xBP
+        BS3_CALL_CONV_EPILOG 1
+        BS3_HYBRID_RET
+BS3_PROC_END_MODE   bs3FpuState1_InitState
+
+
+;;
+; BS3_DECL_NEAR(void) TMPL_NM(bs3FpuState1_Restore)(X86FXSTATE const BS3_FAR *pFxState);
+;
+BS3_PROC_BEGIN_MODE bs3FpuState1_Restore, BS3_PBC_NEAR
+        push    xBP
+        mov     xBP, xSP
+
+%if TMPL_BITS == 64
+        o64     fxrstor [rcx]
+
+%elif TMPL_BITS == 32
+        mov     eax, [xBP + xCB*2]
+        fxrstor [eax]
+
+%elif TMPL_BITS == 16
+        mov     ax, ds
+        mov     ds, [xBP + xCB + cbCurRetAddr + 2]
+        mov     xBX, [xBP + xCB + cbCurRetAddr]
+        fxrstor [bx]
+        mov     ds, ax
+%else
+ %error TMPL_BITS
+%endif
+
+        mov     xSP, xBP
+        pop     xBP
+        BS3_HYBRID_RET
+BS3_PROC_END_MODE   bs3FpuState1_Restore
+
+;;
+; BS3_DECL_NEAR(void) TMPL_NM(bs3FpuState1_Save)(X86FXSTATE BS3_FAR *pFxState);
+;
+BS3_PROC_BEGIN_MODE bs3FpuState1_Save, BS3_PBC_NEAR
+        push    xBP
+        mov     xBP, xSP
+
+%if TMPL_BITS == 64
+        o64     fxsave [rcx]
+
+%elif TMPL_BITS == 32
+        mov     eax, [xBP + xCB*2]
+        fxsave  [eax]
+
+%elif TMPL_BITS == 16
+        push    bx
+        push    ds
+        mov     ds, [xBP + xCB + cbCurRetAddr + 2]
+        mov     bx, [xBP + xCB + cbCurRetAddr]
+        fxsave  [bx]
+        pop     ds
+        pop     bx
+%else
+ %error TMPL_BITS
+%endif
+
+        mov     xSP, xBP
+        pop     xBP
+        BS3_HYBRID_RET
+BS3_PROC_END_MODE   bs3FpuState1_Save
+
+
+%include "bs3kit-template-footer.mac"   ; reset environment
+
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1.c
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1.c	(revision 61315)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1.c	(revision 61315)
@@ -0,0 +1,86 @@
+/* $Id$ */
+/** @file
+ * BS3Kit - bs3-fpustate-1, 16-bit C code.
+ */
+
+/*
+ * Copyright (C) 2007-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <bs3kit.h>
+#include <iprt/asm-amd64-x86.h>
+
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+BS3TESTMODE_PROTOTYPES_MODE(bs3FpuState1_Corruption);
+
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+static const BS3TESTMODEENTRY g_aModeTest[] =
+{
+    {
+        /*pszSubTest =*/ "corruption",
+        /*RM*/        NULL, //bs3FpuState1_Corruption_rm,
+        /*PE16*/      NULL, //bs3FpuState1_Corruption_pe16,
+        /*PE16_32*/   NULL, //bs3FpuState1_Corruption_pe16_32,
+        /*PE16_V86*/  NULL, //bs3FpuState1_Corruption_pe16_v86,
+        /*PE32*/      bs3FpuState1_Corruption_pe32,
+        /*PE32_16*/   NULL, //bs3FpuState1_Corruption_pe32_16,
+        /*PEV86*/     NULL, //bs3FpuState1_Corruption_pev86,
+        /*PP16*/      NULL, //bs3FpuState1_Corruption_pp16,
+        /*PP16_32*/   NULL, //bs3FpuState1_Corruption_pp16_32,
+        /*PP16_V86*/  NULL, //bs3FpuState1_Corruption_pp16_v86,
+        /*PP32*/      bs3FpuState1_Corruption_pp32,
+        /*PP32_16*/   NULL, //bs3FpuState1_Corruption_pp32_16,
+        /*PPV86*/     NULL, //bs3FpuState1_Corruption_ppv86,
+        /*PAE16*/     NULL, //bs3FpuState1_Corruption_pae16,
+        /*PAE16_32*/  NULL, //bs3FpuState1_Corruption_pae16_32,
+        /*PAE16_V86*/ NULL, //bs3FpuState1_Corruption_pae16_v86,
+        /*PAE32*/     bs3FpuState1_Corruption_pae32,
+        /*PAE32_16*/  NULL, //bs3FpuState1_Corruption_pae32_16,
+        /*PAEV86*/    NULL, //bs3FpuState1_Corruption_paev86,
+        /*LM16*/      NULL, //bs3FpuState1_Corruption_lm16,
+        /*LM32*/      NULL, //bs3FpuState1_Corruption_lm32,
+        /*LM64*/      bs3FpuState1_Corruption_lm64,
+    }
+};
+
+
+BS3_DECL(void) Main_rm()
+{
+    Bs3InitAll_rm();
+    Bs3TestInit("bs3-fpustate-1");
+    Bs3TestPrintf("g_uBs3CpuDetected=%#x\n", g_uBs3CpuDetected);
+
+    Bs3TestDoModes_rm(g_aModeTest, RT_ELEMENTS(g_aModeTest));
+
+    Bs3TestTerm();
+for (;;) { ASMHalt(); }
+}
+
+
