VirtualBox

Changeset 46917 in vbox for trunk/src/VBox/VMM/testcase


Ignore:
Timestamp:
Jul 2, 2013 5:44:45 PM (11 years ago)
Author:
vboxsync
Message:

bs2 + VBoxInsTst hacking.

Location:
trunk/src/VBox/VMM/testcase/Instructions
Files:
1 added
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/Instructions/InstructionTestGen.py

    r46906 r46917  
    134134g_iMyRandSeed = int((os.urandom(4)).encode('hex'), 16);
    135135#g_iMyRandSeed = 286523426;
     136#g_iMyRandSeed = 1994382324;
    136137g_oMyRand = random.Random(g_iMyRandSeed);
    137138#g_oMyRand = random.SystemRandom();
     
    378379    'iprt-r3-32':   TargetEnv('iprt-r3-32', TargetEnv.ksInstrSet_32, TargetEnv.ksCpuMode_Protect, 3),
    379380    'iprt-r3-64':   TargetEnv('iprt-r3-64', TargetEnv.ksInstrSet_64, TargetEnv.ksCpuMode_Long,    3),
     381    'bs2-r0-64':    TargetEnv('bs2-r0-64',  TargetEnv.ksInstrSet_64, TargetEnv.ksCpuMode_Long,    0),
    380382};
    381383
     
    838840                                # SIB - currently only short list of inputs or things may get seriously out of hand.
    839841                                self.generateStdTestGregMemSib(oGen, cAddrBits, cbEffOp, cbMaxOp, oGen.iModReg, auShortInputs);
    840                     break;
    841                 break;
     842                    #break;
     843                #break;
    842844
    843845
  • trunk/src/VBox/VMM/testcase/Instructions/env-bs2-r0.mac

    r46906 r46917  
    11; $Id$
    22;; @file
    3 ; Instruction Test Environment - IPRT, Ring-3, 32-bit and 64-bit.
     3; Instruction Test Environment - Boot Sector Type 2, Ring-0.
    44;
    55
     
    1616;
    1717
    18 %ifndef ___env_iprt_r3_mac
    19 %define ___env_iprt_r3_mac
    20 
    21 ;*******************************************************************************
    22 ;*  Header Files                                                               *
    23 ;*******************************************************************************
    24 %include "iprt/asmdefs.mac"
    25 
    26 
    27 ;*******************************************************************************
    28 ;*  Defined Constants And Macros                                               *
    29 ;*******************************************************************************
    30 %define sAX xAX
    31 %define sBX xBX
    32 %define sCX xCX
    33 %define sDX xDX
    34 %define sSP xSP
    35 %define sBP xBP
    36 %define sSI xSI
    37 %define sDI xDI
    38 %define sCB xCB
     18%ifndef ___env_bs2_r0_mac
     19%define ___env_bs2_r0_mac
    3920
    4021
    4122;; Same as BEGINPROC in asmdefs.mac.
    4223%macro VBINSTST_BEGINPROC 1
    43 BEGINPROC %1
     24VBINSTST_GLOBALNAME_EX %1, function hidden
    4425%endm
    4526
    4627;; Same as ENDPROC in asmdefs.mac.
    47 %macro VBINSTST_ENDPROC   1
    48 ENDPROC %1
     28%macro VBINSTST_ENDPROC 1,
     29VBINSTST_GLOBALNAME_EX %1 %+ _EndProc, function hidden
    4930%endm
    5031
    5132;; Same as NAME in asmdefs.mac.
    52 %define VBINSTST_NAME(a_Name)   NAME(a_Name)
     33%define VBINSTST_NAME(a_Name)   TMPL_NM(a_Name)
    5334
    5435;; Same as GLOBALNAME_EX in asmdefs.mac.
    55 %define VBINSTST_GLOBALNAME_EX  GLOBALNAME_EX
     36%macro VBINSTST_GLOBALNAME_EX 2,
     37VBINSTST_NAME(%1):
     38%endmacro
    5639
    5740;; Same as BEGINCODE in asmdefs.mac.
    58 %define VBINSTST_BEGINCODE      BEGINCODE
     41%macro VBINSTST_BEGINCODE 0,
     42%endmacro
    5943
    6044;; Same as BEGINDATA in asmdefs.mac.
    61 %define VBINSTST_BEGINDATA      BEGINDATA
     45%macro VBINSTST_BEGINDATA 0,
     46%endmacro
    6247
    6348
    6449;; Call RTTestISub like function.
    65 %define VBINSTST_CALL_FN_SUB_TEST   call IMP2(RTTestISub)
    66 EXTERN_IMP2 RTTestISub
     50%define VBINSTST_CALL_FN_SUB_TEST   call TMPL_NM_CMN(TestSub)
    6751
    6852;; Call RTTestIFailure like function with simple message.
    69 %define VBINSTST_CALL_FN_FAILURE    call NAME(VBInsTstFailure)
    70 extern NAME(VBInsTstFailure)
     53%define VBINSTST_CALL_FN_FAILURE    call TMPL_NM_CMN(TestFailedF)
    7154
    7255;; Call RTTestIFailure like function with format message + 1 arg.
    73 %define VBINSTST_CALL_FN_FAILURE_1  call NAME(VBInsTstFailure1)
    74 extern NAME(VBInsTstFailure1)
     56%define VBINSTST_CALL_FN_FAILURE_1  call TMPL_NM_CMN(TestFailedF)
    7557
    7658;; Call RTTestIFailure like function with format message + 2 args.
    77 %define VBINSTST_CALL_FN_FAILURE_2  call NAME(VBInsTstFailure2)
    78 extern NAME(VBInsTstFailure2)
     59%define VBINSTST_CALL_FN_FAILURE_2  call TMPL_NM_CMN(TestFailedF)
    7960
    8061;; Call RTTestIFailure like function with format message + 3 args.
    81 %define VBINSTST_CALL_FN_FAILURE_3  call NAME(VBInsTstFailure3)
    82 extern NAME(VBInsTstFailure3)
     62%define VBINSTST_CALL_FN_FAILURE_3  call TMPL_NM_CMN(TestFailedF)
    8363
    8464;; Call RTTestIFailure like function with format message + 4 args.
    85 %define VBINSTST_CALL_FN_FAILURE_4  call NAME(VBInsTstFailure4)
    86 extern NAME(VBInsTstFailure4)
     65%define VBINSTST_CALL_FN_FAILURE_4  call TMPL_NM_CMN(TestFailedF)
    8766
    8867
  • trunk/src/VBox/VMM/testcase/Instructions/env-common.mac

    r46893 r46917  
    138138        VBINSTST_CALL_FN_FAILURE_4
    139139
     140%elifdef ASM_CALL64_BS2
     141        mov     sBX, [VBINSTST_NAME(g_uVBInsTstSubTestIndicator) xWrtRIP]
     142        mov     sCX, [xBP + xCB + xCB]     ; expected
     143        mov     sAX, [xBP + xCB + xCB + sCB*1] ; actual
     144        mov     sDX, [xBP + xCB + xCB + sCB*2] ; reg#
     145        lea     sSI, [.szFmt xWrtRIP]
     146        mov     qword [xSP + xCB + 3*sCB], sBX
     147        mov     qword [xSP + xCB + 2*sCB], sCX
     148        mov     qword [xSP + xCB + 1*sCB], sAX
     149        mov     qword [xSP + xCB], sDX
     150        mov     [xSP], sSI
     151        VBINSTST_CALL_FN_FAILURE_4
     152
    140153%else
    141154        mov     sBX, [VBINSTST_NAME(g_uVBInsTstSubTestIndicator)]
    142         mov     sCX, [xBP + 4 + xCB]     ; expected
    143         mov     sAX, [xBP + 4 + xCB + 4] ; actual
    144         mov     sDX, [xBP + 4 + xCB + 8] ; reg#
     155        mov     sCX, [xBP + xCB + xCB]     ; expected
     156        mov     sAX, [xBP + xCB + xCB + sCB*1] ; actual
     157        mov     sDX, [xBP + xCB + xCB + sCB*2] ; reg#
    145158        mov     [xSP + xCB + 3*sCB], sBX
    146159        mov     [xSP + xCB + 2*sCB], sCX
     
    155168        ret     3*sCB
    156169%if ARCH_BITS == 64
    157 .szFmt: db 'Bad register %#llx value %#018llx, expected %#018llx (line %llu)', 0
    158 %else
    159 .szFmt: db 'Bad register %lx value %#010lx, expected %#010lx (line %lu)', 0
     170.szFmt: db 'Bad register 0x%RX32 value 0x%RX64, expected 0x%RX64 (line %RU64)', 13, 0
     171%else
     172.szFmt: db 'Bad register 0x%RX32 value 0x%RX32, expected 0x%RX32 (line %RU32)', 13, 0
    160173%endif
    161174VBINSTST_ENDPROC   Common_BadValue
     
    167180; For address calculation reasons, these must be qword aligned.
    168181;
    169 BEGINDATA
     182VBINSTST_BEGINDATA
    170183        dd      09d8af498h, 09ab3e5f8h
    171184VBINSTST_GLOBALNAME_EX g_u64Data, data hidden
     
    186199        dd      058daffe2h
    187200
    188 BEGINCODE
     201VBINSTST_BEGINCODE
    189202
    190203;;
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