VirtualBox

Changeset 49732 in vbox


Ignore:
Timestamp:
Nov 29, 2013 6:54:30 PM (11 years ago)
Author:
vboxsync
Message:

Easier to read.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstX86-FpuSaveRestore.cpp

    r49731 r49732  
    3939
    4040
     41
    4142    RTTestSub(hTest, "CS/DS Selector");
    4243
     44    RTTestIPrintf(RTTESTLVL_ALWAYS,  "Initial state:\n");
    4345    /* Trigger an exception to make sure we've got something to look at. */
    4446    MyFpuPrepXcpt();
    45 
    46     /* Initial state.*/
    4747    static X86FXSTATE FxState;
    4848    MyFpuSave(&FxState);
     
    5050    MyFpuStoreEnv(&FpuEnv);
    5151#ifdef RT_ARCH_AMD64
    52     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState IP=%#06x%04x%08x\n",  FxState.Rsrvd1, FxState.CS, FxState.FPUIP);
     52    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState IP=%#06x%04x%08x\n",  FxState.Rsrvd1, FxState.CS, FxState.FPUIP);
    5353#else
    54     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState CS:IP=%#06x:%#010x\n",  FxState.CS, FxState.FPUIP);
     54    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState CS:IP=%#06x:%#010x\n",  FxState.CS, FxState.FPUIP);
    5555#endif
    56     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnv.FPUCS, FpuEnv.FPUIP);
     56    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnv.FPUCS, FpuEnv.FPUIP);
    5757
    5858    /* Modify the state a little so we can tell the difference. */
     
    6565
    6666    /* Just do FXRSTOR. */
     67    RTTestIPrintf(RTTESTLVL_ALWAYS,  "Just FXRSTOR:\n");
    6768    MyFpuRestore(&FxState2);
    6869
     
    7273    MyFpuStoreEnv(&FpuEnvJustRestore);
    7374#ifdef RT_ARCH_AMD64
    74     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState IP=%#06x%04x%08x\n",  FxStateJustRestore.Rsrvd1, FxStateJustRestore.CS, FxStateJustRestore.FPUIP);
     75    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState IP=%#06x%04x%08x\n",  FxStateJustRestore.Rsrvd1, FxStateJustRestore.CS, FxStateJustRestore.FPUIP);
    7576#else
    76     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState CS:IP=%#06x:%#010x\n",  FxStateJustRestore.CS, FxStateJustRestore.FPUIP);
     77    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState CS:IP=%#06x:%#010x\n",  FxStateJustRestore.CS, FxStateJustRestore.FPUIP);
    7778#endif
    78     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnvJustRestore.FPUCS, FpuEnvJustRestore.FPUIP);
     79    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnvJustRestore.FPUCS, FpuEnvJustRestore.FPUIP);
    7980
    8081
    8182    /* FXRSTORE + FLDENV */
     83    RTTestIPrintf(RTTESTLVL_ALWAYS,  "FXRSTOR first, then FLDENV:\n");
    8284    MyFpuRestore(&FxState2);
    8385    MyFpuLoadEnv(&FpuEnv2);
     
    8890    MyFpuStoreEnv(&FpuEnvRestoreLoad);
    8991#ifdef RT_ARCH_AMD64
    90     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState IP=%#06x%04x%08x\n",  FxStateRestoreLoad.Rsrvd1, FxStateRestoreLoad.CS, FxStateRestoreLoad.FPUIP);
     92    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState IP=%#06x%04x%08x\n",  FxStateRestoreLoad.Rsrvd1, FxStateRestoreLoad.CS, FxStateRestoreLoad.FPUIP);
    9193#else
    92     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState CS:IP=%#06x:%#010x\n",  FxStateRestoreLoad.CS, FxStateRestoreLoad.FPUIP);
     94    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState CS:IP=%#06x:%#010x\n",  FxStateRestoreLoad.CS, FxStateRestoreLoad.FPUIP);
    9395#endif
    94     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnvRestoreLoad.FPUCS, FpuEnvRestoreLoad.FPUIP);
     96    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnvRestoreLoad.FPUCS, FpuEnvRestoreLoad.FPUIP);
    9597
    9698    /* Reverse the order (FLDENV + FXRSTORE). */
     99    RTTestIPrintf(RTTESTLVL_ALWAYS,  "FLDENV first, then FXRSTOR:\n");
    97100    MyFpuLoadEnv(&FpuEnv2);
    98101    MyFpuRestore(&FxState2);
     
    103106    MyFpuStoreEnv(&FpuEnvLoadRestore);
    104107#ifdef RT_ARCH_AMD64
    105     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState IP=%#06x%04x%08x\n",  FxStateLoadRestore.Rsrvd1, FxStateLoadRestore.CS, FxStateLoadRestore.FPUIP);
     108    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState IP=%#06x%04x%08x\n",  FxStateLoadRestore.Rsrvd1, FxStateLoadRestore.CS, FxStateLoadRestore.FPUIP);
    106109#else
    107     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FxState CS:IP=%#06x:%#010x\n",  FxStateLoadRestore.CS, FxStateLoadRestore.FPUIP);
     110    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FxState CS:IP=%#06x:%#010x\n",  FxStateLoadRestore.CS, FxStateLoadRestore.FPUIP);
    108111#endif
    109     RTTestIPrintf(RTTESTLVL_ALWAYS,  "FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnvLoadRestore.FPUCS, FpuEnvLoadRestore.FPUIP);
     112    RTTestIPrintf(RTTESTLVL_ALWAYS,  "  FpuEnv  CS:IP=%#06x:%#010x\n",  FpuEnvLoadRestore.FPUCS, FpuEnvLoadRestore.FPUIP);
    110113
    111114
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette