VirtualBox

Changeset 49021 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 10, 2013 9:02:04 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89770
Message:

VMM/CPUMRCA.asm: Only IN_RC, don't leave legacy ifndef IN_RING3 lying around.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMRC/CPUMRCA.asm

    r49020 r49021  
    169169align 16
    170170hlfpua_switch_fpu_ctx:
    171 %ifndef IN_RING3 ; IN_RC or IN_RING0
     171    ; Paranoia. This function was previously used in ring-0, not any longer.
     172%ifdef IN_RING3
     173%error "This function is not written for ring-3"
     174%endif
     175%ifdef IN_RING0
     176%error "This function is not written for ring-0"
     177%endif
     178
    172179    mov     xCX, cr0
    173  %ifdef RT_ARCH_AMD64
     180%ifdef RT_ARCH_AMD64
    174181    lea     r8, [hlfpu_afFlags wrt rip]
    175182    and     rcx, [rax*4 + r8]                   ; calc the new cr0 flags.
    176  %else
     183%else
    177184    and     ecx, [eax*2 + hlfpu_afFlags]        ; calc the new cr0 flags.
    178  %endif
     185%endif
    179186    mov     xAX, cr0
    180187    and     xAX, ~(X86_CR0_TS | X86_CR0_EM)
    181188    mov     cr0, xAX                            ; clear flags so we don't trap here.
    182 %endif
    183189%ifndef RT_ARCH_AMD64
    184190    mov     eax, edx                            ; Calculate the PCPUM pointer
     
    204210    ; Load new CR0 value.
    205211    ;; @todo Optimize the many unconditional CR0 writes.
    206 %ifndef IN_RING3
    207212    mov     cr0, xCX                            ; load the new cr0 flags.
    208 %endif
     213
    209214    ; return continue execution.
    210215    xor     eax, eax
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette