VirtualBox

Changeset 23297 in vbox for trunk/src/VBox/VMM/VMMGC


Ignore:
Timestamp:
Sep 24, 2009 4:38:01 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52790
Message:

Zero out the high parts of all registers in the RC trap handler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMGC/TRPMGCHandlersA.asm

    r20673 r23297  
    265265    mov     eax, [esp + 14h + ESPOFF]           ; esp
    266266    mov     [esp + CPUMCTXCORE.esp], eax
    267 %if GC_ARCH_BITS == 64
    268     ; zero out the high dword
    269     mov     dword [esp + CPUMCTXCORE.esp + 4], 0
    270 %endif
    271267    mov     eax, [esp + 18h + ESPOFF]           ; ss
    272268    mov     dword [esp + CPUMCTXCORE.ss], eax
     
    276272    mov     eax, [esp + 08h + ESPOFF]           ; eip
    277273    mov     [esp + CPUMCTXCORE.eip], eax
    278 %if GC_ARCH_BITS == 64
    279     ; zero out the high dword
    280     mov     dword [esp + CPUMCTXCORE.eip + 4], 0
    281 %endif
    282274    mov     eax, [esp + 10h + ESPOFF]           ; eflags
    283275    mov     [esp + CPUMCTXCORE.eflags], eax
     276
     277%if GC_ARCH_BITS == 64   
     278    ; zero out the high dwords
     279    mov     dword [esp + CPUMCTXCORE.eax + 4], 0
     280    mov     dword [esp + CPUMCTXCORE.ecx + 4], 0
     281    mov     dword [esp + CPUMCTXCORE.edx + 4], 0
     282    mov     dword [esp + CPUMCTXCORE.ebx + 4], 0
     283    mov     dword [esp + CPUMCTXCORE.esi + 4], 0
     284    mov     dword [esp + CPUMCTXCORE.edi + 4], 0
     285    mov     dword [esp + CPUMCTXCORE.ebp + 4], 0
     286    mov     dword [esp + CPUMCTXCORE.esp + 4], 0
     287    mov     dword [esp + CPUMCTXCORE.eip + 4], 0
     288%endif
    284289
    285290    mov     eax, es
     
    764769    mov     eax, [esp + 04h + ESPOFF]           ; eip
    765770    mov     [esp + CPUMCTXCORE.eip], eax
    766 %if GC_ARCH_BITS == 64
    767     ; zero out the high dword
    768     mov     dword [esp + CPUMCTXCORE.eip + 4], 0
    769 %endif
    770771    mov     eax, dword [esp + 08h + ESPOFF]     ; cs
    771772    mov     [esp + CPUMCTXCORE.cs], eax
     
    775776    mov     eax, [esp + 10h + ESPOFF]           ; esp
    776777    mov     [esp + CPUMCTXCORE.esp], eax
    777 %if GC_ARCH_BITS == 64
    778     ; zero out the high dword
    779     mov     dword [esp + CPUMCTXCORE.esp + 4], 0
    780 %endif
    781778    mov     eax, dword [esp + 14h + ESPOFF]     ; ss
    782779    mov     [esp + CPUMCTXCORE.ss], eax
     780
     781%if GC_ARCH_BITS == 64   
     782    ; zero out the high dwords
     783    mov     dword [esp + CPUMCTXCORE.eax + 4], 0
     784    mov     dword [esp + CPUMCTXCORE.ecx + 4], 0
     785    mov     dword [esp + CPUMCTXCORE.edx + 4], 0
     786    mov     dword [esp + CPUMCTXCORE.ebx + 4], 0
     787    mov     dword [esp + CPUMCTXCORE.esi + 4], 0
     788    mov     dword [esp + CPUMCTXCORE.edi + 4], 0
     789    mov     dword [esp + CPUMCTXCORE.ebp + 4], 0
     790    mov     dword [esp + CPUMCTXCORE.esp + 4], 0
     791    mov     dword [esp + CPUMCTXCORE.eip + 4], 0
     792%endif
    783793
    784794    mov     eax, es
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