Changeset 53195 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Nov 4, 2014 12:44:27 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 96741
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-1.mac
r52776 r53195 1191 1191 jae .div_overflow 1192 1192 mov eax, [sAX] 1193 shld edx, eax, 10 1194 shl eax,10 1193 1195 div ecx ; eax = NS per test 1194 1196 … … 1197 1199 cmp ecx, 0 1198 1200 jz .div_zero 1199 xor edx, edx1200 mov eax, 1000000000 ; 1G1201 mov edx, 0xee 1202 mov eax, 0x6b280000 ; 1024G 1201 1203 div ecx ; eax = tests per second 1202 1204 -
trunk/src/VBox/ValidationKit/bootsectors/bootsector2-test1-template.mac
r52776 r53195 92 92 db TMPL_MODE_STR, ', CPUID', 0 93 93 ENDPROC TMPL_NM(BenchmarkCpuId_rm) 94 95 TMPL_BEGINCODE 96 BITS TMPL_BITS 97 98 99 ;; 100 ; Run the RDTSC benchmark for this mode. 101 ; 102 ; @uses nothing 103 ; 104 BEGINCODELOW 105 BITS 16 106 BEGINPROC TMPL_NM(BenchmarkRdTsc_rm) 107 call TMPL_NM(Bs2IsModeSupported_rm) 108 jz .done 109 call TMPL_NM(Bs2EnterMode_rm) 110 BITS TMPL_BITS 111 push xBP 112 mov xBP, xSP 113 push sAX 114 push sBX 115 push sCX 116 push sDX 117 push sDI 118 sub sSP, 20h 119 120 ; Get the current time. 121 mov xAX, xSP 122 call TMPL_NM_CMN(GetNanoTS) 123 124 ; Do the test. 125 mov edi, TEST_INSTRUCTION_COUNT_RDTSC / 4 126 .again: 127 rdtsc 128 rdtsc 129 rdtsc 130 rdtsc 131 dec edi 132 jnz .again 133 134 ; Calc the elapsed time and report the result. 135 mov xAX, xSP 136 call TMPL_NM_CMN(GetElapsedNanoTS) 137 138 mov xCX, .s_szTestName 139 mov edx, TEST_INSTRUCTION_COUNT_RDTSC 140 mov xAX, xSP 141 call TMPL_NM_CMN(ReportResult) 142 143 add sSP, 20h 144 pop sDI 145 pop sDX 146 pop sCX 147 pop sBX 148 pop sAX 149 leave 150 151 call TMPL_NM(Bs2ExitMode) 152 BITS 16 153 .done: 154 ret 155 156 .s_szTestName: 157 db TMPL_MODE_STR, ', RDTSC', 0 158 ENDPROC TMPL_NM(BenchmarkRdTsc_rm) 94 159 95 160 TMPL_BEGINCODE -
trunk/src/VBox/ValidationKit/bootsectors/bootsector2-test1.asm
r52776 r53195 34 34 ;; The number of instructions to test. 35 35 %define TEST_INSTRUCTION_COUNT_IO 2000000 36 37 ;; The number of RDTSC instructions to test. 38 %define TEST_INSTRUCTION_COUNT_RDTSC 4000000 36 39 37 40 ;; The number of instructions to test. … … 78 81 79 82 ; 83 ; RDTSC. 84 ; 85 mov ax, .s_szTstRdTsc 86 call TestSub_r86 87 call BenchmarkRdTsc_rm_pp32 88 call BenchmarkRdTsc_rm_pae32 89 call BenchmarkRdTsc_rm_lm64 90 call BenchmarkRdTsc_rm_pe16 91 call BenchmarkRdTsc_rm_pe32 92 call BenchmarkRdTsc_rm_rm 93 94 ; 80 95 ; I/O port access. 81 96 ; … … 111 126 .s_szTstCpuId: 112 127 db 'CPUID EAX=1', 0 128 .s_szTstRdTsc: 129 db 'RDTSC', 0 113 130 .s_szTstNopIoPort: 114 131 db 'NOP I/O Port Access', 0
Note:
See TracChangeset
for help on using the changeset viewer.