- Timestamp:
- May 29, 2013 2:08:18 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r46267 r46312 298 298 %ifndef ASM_CALL64_GCC 299 299 ; On msc R10, R11 are scratch, RDI and RSI are not. So we must save and restore them! 300 mov 301 mov 300 mov r10, rdi 301 mov r11, rsi 302 302 ; Switch to common register usage (i.e. gcc's in this function) 303 303 mov rdi, rcx … … 307 307 test edi, VMX_RESTORE_HOST_GDTR 308 308 jz near .test_idtr 309 lgdt [rsi + 18h] ; pRestoreHost->HostGdtr309 lgdt [rsi + VMXRESTOREHOST.HostGdtr] 310 310 311 311 .test_idtr: 312 312 test edi, VMX_RESTORE_HOST_IDTR 313 313 jz near .test_ds 314 lidt [rsi + 22h] ; pRestoreHost->HostIdtr314 lidt [rsi + VMXRESTOREHOST.HostIdtr] 315 315 316 316 .test_ds: 317 317 test edi, VMX_RESTORE_HOST_SEL_DS 318 318 jz near .test_es 319 mov ax, word [rsi ] ; pRestoreHost->uHostSelDS320 mov ds, ax 319 mov ax, word [rsi + VMXRESTOREHOST.uHostSelDS] 320 mov ds, ax 321 321 322 322 .test_es: 323 323 test edi, VMX_RESTORE_HOST_SEL_ES 324 324 jz near .test_fs 325 mov ax, word [rsi + 2] ; pRestoreHost->uHostSelES326 mov es, ax 325 mov ax, word [rsi + VMXRESTOREHOST.uHostSelES] 326 mov es, ax 327 327 328 328 .test_fs: … … 333 333 test edi, VMX_RESTORE_HOST_SEL_FS 334 334 jz near .test_gs 335 mov ax, word [rsi + 4] ; pRestoreHost->uHostSelFS335 mov ax, word [rsi + VMXRESTOREHOST.uHostSelFS] 336 336 cli ; Disable interrupts as mov fs, ax will zap the upper part of the base 337 337 mov fs, ax 338 mov eax, dword [rsi + 8] ; pRestoreHost->uHostFSBase - Lo339 mov edx, dword [rsi + 0Ch] ; pRestoreHost->uHostFSBase - Hi338 mov eax, dword [rsi + VMXRESTOREHOST.uHostFSBase] ; uHostFSBase - Lo 339 mov edx, dword [rsi + VMXRESTOREHOST.uHostFSBase + 4h] ; uHostFSBase - Hi 340 340 mov ecx, MSR_K8_FS_BASE 341 341 wrmsr … … 345 345 test edi, VMX_RESTORE_HOST_SEL_GS 346 346 jz near .restore_success 347 mov ax, word [rsi + 6] ; pRestoreHost->uHostSelGS347 mov ax, word [rsi + VMXRESTOREHOST.uHostSelGS] 348 348 cli ; Disable interrupts as mov gs, ax will zap the upper part of the base 349 349 mov gs, ax 350 mov eax, dword [rsi + 10h] ; pRestoreHost->uHostGSBase - Lo351 mov edx, dword [rsi + 14h] ; pRestoreHost->uHostGSBase - Hi350 mov eax, dword [rsi + VMXRESTOREHOST.uHostGSBase] ; uHostGSBase - Lo 351 mov edx, dword [rsi + VMXRESTOREHOST.uHostGSBase + 4h] ; uHostGSBase - Hi 352 352 mov ecx, MSR_K8_GS_BASE 353 353 wrmsr … … 358 358 %ifndef ASM_CALL64_GCC 359 359 ; Restore RDI and RSI on MSC. 360 mov 361 mov 360 mov rdi, r10 361 mov rsi, r11 362 362 %endif 363 363 %else ; RT_ARCH_X86 -
trunk/src/VBox/VMM/testcase/tstAsmStructsAsm.asm
r44528 r46312 29 29 %include "VBox/vmm/cpum.mac" 30 30 %include "VBox/vmm/vm.mac" 31 %include "VBox/vmm/hm_vmx.mac" 31 32 %include "VBox/sup.mac" 32 33 %include "VMMSwitcher.mac"
Note:
See TracChangeset
for help on using the changeset viewer.