Changeset 46917 in vbox for trunk/src/VBox/VMM/testcase
- Timestamp:
- Jul 2, 2013 5:44:45 PM (11 years ago)
- 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 134 134 g_iMyRandSeed = int((os.urandom(4)).encode('hex'), 16); 135 135 #g_iMyRandSeed = 286523426; 136 #g_iMyRandSeed = 1994382324; 136 137 g_oMyRand = random.Random(g_iMyRandSeed); 137 138 #g_oMyRand = random.SystemRandom(); … … 378 379 'iprt-r3-32': TargetEnv('iprt-r3-32', TargetEnv.ksInstrSet_32, TargetEnv.ksCpuMode_Protect, 3), 379 380 '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), 380 382 }; 381 383 … … 838 840 # SIB - currently only short list of inputs or things may get seriously out of hand. 839 841 self.generateStdTestGregMemSib(oGen, cAddrBits, cbEffOp, cbMaxOp, oGen.iModReg, auShortInputs); 840 break;841 break;842 #break; 843 #break; 842 844 843 845 -
trunk/src/VBox/VMM/testcase/Instructions/env-bs2-r0.mac
r46906 r46917 1 1 ; $Id$ 2 2 ;; @file 3 ; Instruction Test Environment - IPRT, Ring-3, 32-bit and 64-bit.3 ; Instruction Test Environment - Boot Sector Type 2, Ring-0. 4 4 ; 5 5 … … 16 16 ; 17 17 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 39 20 40 21 41 22 ;; Same as BEGINPROC in asmdefs.mac. 42 23 %macro VBINSTST_BEGINPROC 1 43 BEGINPROC %1 24 VBINSTST_GLOBALNAME_EX %1, function hidden 44 25 %endm 45 26 46 27 ;; Same as ENDPROC in asmdefs.mac. 47 %macro VBINSTST_ENDPROC 148 ENDPROC %1 28 %macro VBINSTST_ENDPROC 1, 29 VBINSTST_GLOBALNAME_EX %1 %+ _EndProc, function hidden 49 30 %endm 50 31 51 32 ;; 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) 53 34 54 35 ;; Same as GLOBALNAME_EX in asmdefs.mac. 55 %define VBINSTST_GLOBALNAME_EX GLOBALNAME_EX 36 %macro VBINSTST_GLOBALNAME_EX 2, 37 VBINSTST_NAME(%1): 38 %endmacro 56 39 57 40 ;; Same as BEGINCODE in asmdefs.mac. 58 %define VBINSTST_BEGINCODE BEGINCODE 41 %macro VBINSTST_BEGINCODE 0, 42 %endmacro 59 43 60 44 ;; Same as BEGINDATA in asmdefs.mac. 61 %define VBINSTST_BEGINDATA BEGINDATA 45 %macro VBINSTST_BEGINDATA 0, 46 %endmacro 62 47 63 48 64 49 ;; 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) 67 51 68 52 ;; 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) 71 54 72 55 ;; 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) 75 57 76 58 ;; 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) 79 60 80 61 ;; 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) 83 63 84 64 ;; 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) 87 66 88 67 -
trunk/src/VBox/VMM/testcase/Instructions/env-common.mac
r46893 r46917 138 138 VBINSTST_CALL_FN_FAILURE_4 139 139 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 140 153 %else 141 154 mov sBX, [VBINSTST_NAME(g_uVBInsTstSubTestIndicator)] 142 mov sCX, [xBP + 4+ xCB] ; expected143 mov sAX, [xBP + 4 + xCB + 4] ; actual144 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# 145 158 mov [xSP + xCB + 3*sCB], sBX 146 159 mov [xSP + xCB + 2*sCB], sCX … … 155 168 ret 3*sCB 156 169 %if ARCH_BITS == 64 157 .szFmt: db 'Bad register %#llx value %#018llx, expected %#018llx (line %llu)', 0158 %else 159 .szFmt: db 'Bad register %lx value %#010lx, expected %#010lx (line %lu)', 0170 .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 160 173 %endif 161 174 VBINSTST_ENDPROC Common_BadValue … … 167 180 ; For address calculation reasons, these must be qword aligned. 168 181 ; 169 BEGINDATA182 VBINSTST_BEGINDATA 170 183 dd 09d8af498h, 09ab3e5f8h 171 184 VBINSTST_GLOBALNAME_EX g_u64Data, data hidden … … 186 199 dd 058daffe2h 187 200 188 BEGINCODE201 VBINSTST_BEGINCODE 189 202 190 203 ;;
Note:
See TracChangeset
for help on using the changeset viewer.