Changeset 61031 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- May 18, 2016 11:12:00 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/CPUMR0A.asm
r61029 r61031 201 201 202 202 203 ;; Macro for FXSAVE /XSAVEfor the guest FPU but tries to figure out whether to203 ;; Macro for FXSAVE for the guest FPU but tries to figure out whether to 204 204 ; save the 32-bit FPU state or 64-bit FPU state. 205 205 ; … … 207 207 ; @param %2 Pointer to XState. 208 208 ; @param %3 Force AMD64 209 ; @param %4 Use XSAVE210 209 ; @uses xAX, xDX, EFLAGS, 20h of stack. 211 210 ; 212 %macro SAVE_32_OR_64_FPU 4211 %macro SAVE_32_OR_64_FPU 3 213 212 %if CPUMR0_IS_AMD64 || %3 214 213 ; Save the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}. … … 216 215 jnz short %%save_long_mode_guest 217 216 %endif 218 %if %4219 xsave [pXState]220 %else221 217 fxsave [pXState] 222 %endif223 218 %if CPUMR0_IS_AMD64 || %3 224 219 jmp %%save_done_32bit_cs_ds 225 220 226 221 %%save_long_mode_guest: 227 %if %4228 o64 xsave [pXState]229 %else230 222 o64 fxsave [pXState] 231 %endif232 223 233 224 xor edx, edx … … 275 266 and eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Already saved in HMR0A.asm. 276 267 %endif 277 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0, 1 268 %ifdef RT_ARCH_AMD64 269 o64 xsave [pXState] 270 %else 271 xsave [pXState] 272 %endif 278 273 jmp %%guest_done 279 274 280 275 ; FXSAVE 281 276 %%guest_fxsave: 282 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0 , 0277 SAVE_32_OR_64_FPU pCpumCpu, pXState, 0 283 278 284 279 %%guest_done: … … 287 282 288 283 ;; 289 ; Wrapper for selecting 32-bit or 64-bit FXRSTOR /XRSTORaccording to what SAVE_32_OR_64_FPU did.284 ; Wrapper for selecting 32-bit or 64-bit FXRSTOR according to what SAVE_32_OR_64_FPU did. 290 285 ; 291 286 ; @param %1 Pointer to CPUMCPU. 292 287 ; @param %2 Pointer to XState. 293 288 ; @param %3 Force AMD64. 294 ; @param %4 Use XRSTOR295 289 ; @uses xAX, xDX, EFLAGS 296 290 ; 297 %macro RESTORE_32_OR_64_FPU 4291 %macro RESTORE_32_OR_64_FPU 3 298 292 %if CPUMR0_IS_AMD64 || %3 299 293 ; Restore the guest FPU (32-bit or 64-bit), preserves existing broken state. See @bugref{7138}. … … 304 298 %%restore_32bit_fpu: 305 299 %endif 306 %if %4307 xrstor [pXState]308 %else309 300 fxrstor [pXState] 310 %endif311 301 %if CPUMR0_IS_AMD64 || %3 312 302 ; TODO: Restore XMM8-XMM15! 313 303 jmp short %%restore_fpu_done 314 304 %%restore_64bit_fpu: 315 %if %4316 o64 xrstor [pXState]317 %else318 305 o64 fxrstor [pXState] 319 %endif320 306 %%restore_fpu_done: 321 307 %endif … … 348 334 and eax, ~CPUM_VOLATILE_XSAVE_GUEST_COMPONENTS ; Will be loaded by HMR0A.asm. 349 335 %endif 350 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0, 1 336 %ifdef RT_ARCH_AMD64 337 o64 xrstor [pXState] 338 %else 339 xrstor [pXState] 340 %endif 351 341 jmp %%guest_done 352 342 353 343 ; FXRSTOR 354 344 %%guest_fxrstor: 355 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0 , 0345 RESTORE_32_OR_64_FPU pCpumCpu, pXState, 0 356 346 357 347 %%guest_done:
Note:
See TracChangeset
for help on using the changeset viewer.