Changeset 39996 in vbox
- Timestamp:
- Feb 4, 2012 3:55:51 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76107
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstX86-1A.asm
r39995 r39996 1010 1010 BEGINPROC x861_Test3 1011 1011 SAVE_ALL_PROLOGUE 1012 %if 01013 1012 call x861_LoadUniqueRegValuesSSE 1014 1013 mov xDI, REF_GLOBAL(g_pbEfExecPage) … … 1141 1140 ShouldTrap X86_XCPT_GP, fxrstor [xDI + 14] 1142 1141 ShouldTrap X86_XCPT_GP, fxrstor [xDI + 15] 1143 %endif1144 1142 1145 1143 ; Lets check what a FP in fxsave changes ... nothing on intel. … … 1158 1156 mov ecx, 512 / 4 1159 1157 lea xDI, [xSI + 512] 1158 cld 1160 1159 repz cmpsd 1161 mov eax, ebx1160 lea xAX, [xBX + 20000] 1162 1161 jnz .return 1163 1162 1164 1163 add ebx, 16 1165 1164 cmp ebx, 512 1166 jb .fxsave_pf_effect_loop 1167 1165 jbe .fxsave_pf_effect_loop 1166 1167 ; Lets check that a FP in fxrstor does not have any effect on the FPU or SSE state. 1168 mov xDI, REF_GLOBAL(g_pbEfExecPage) 1169 mov ecx, PAGE_SIZE / 4 1170 mov eax, 0ffaa33cch 1171 cld 1172 rep stosd 1173 1174 call x861_LoadUniqueRegValuesSSE 1175 mov xDI, REF_GLOBAL(g_pbEfExecPage) 1176 fxsave [xDI] 1177 1178 call x861_ClearRegistersSSE 1179 mov xDI, REF_GLOBAL(g_pbEfExecPage) 1180 fxsave [xDI + 512] 1181 1182 mov ebx, 16 1183 .fxrstor_pf_effect_loop: 1184 mov xDI, REF_GLOBAL(g_pbEfExecPage) 1185 mov xSI, xDI 1186 lea xDI, [xDI + PAGE_SIZE - 512 + xBX] 1187 mov ecx, 512 1188 sub ecx, ebx 1189 cld 1190 rep movsb ; copy unique state to end of page. 1191 1192 push xBX 1193 call x861_ClearRegistersSSE 1194 pop xBX 1195 mov xDI, REF_GLOBAL(g_pbEfExecPage) 1196 ShouldTrap X86_XCPT_PF, fxrstor [xDI + PAGE_SIZE - 512 + xBX] ; try load unique state 1197 1198 mov xDI, REF_GLOBAL(g_pbEfExecPage) 1199 lea xSI, [xDI + 512] ; point it to the clean state, which is what we expect. 1200 lea xDI, [xDI + 1024] 1201 fxsave [xDI] ; save whatever the fpu state currently is. 1202 mov ecx, 512 / 4 1203 cld 1204 repe cmpsd 1205 lea xAX, [xBX + 40000] 1206 jnz .return ; it shouldn't be modified by faulting fxrstor, i.e. a clean state. 1207 1208 add ebx, 16 1209 cmp ebx, 512 1210 jb .fxrstor_pf_effect_loop 1168 1211 1169 1212 .success:
Note:
See TracChangeset
for help on using the changeset viewer.