VirtualBox

Ignore:
Timestamp:
Mar 23, 2017 5:42:56 PM (8 years ago)
Author:
vboxsync
Message:

ASMGetXcr0,ASMSetXcr0: Ported to 16-bit

Location:
trunk/src/VBox/Runtime/common/asm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/asm/ASMGetXcr0.asm

    r62477 r66236  
    4545        or      rax, rdx
    4646%endif
     47%if ARCH_BITS == 16 ; DX:CX:BX:AX - DX=15:0, CX=31:16, BX=47:32, AX=63:48
     48        mov     ebx, edx
     49        mov     ecx, eax
     50        shr     ecx, 16
     51        xchg    eax, edx
     52        shr     eax, 16
     53%endif
    4754        ret
    4855ENDPROC ASMGetXcr0
  • trunk/src/VBox/Runtime/common/asm/ASMSetXcr0.asm

    r62477 r66236  
    4848        shr     rdx, 32
    4949        mov     eax, edi
    50 %elifdef RT_ARCH_X86
     50%elif ARCH_BITS == 32
    5151        mov     eax, [esp + 4]
    5252        mov     edx, [esp + 8]
     53%elif ARCH_BITS == 16
     54        push    bp
     55        mov     bp, sp
     56        mov     eax, [bp + 4]
     57        mov     edx, [bp + 8]
    5358%else
    5459 %error "Undefined arch?"
    5560%endif
     61
    5662        xor     ecx, ecx
    5763        xsetbv
     64
     65%if ARCH_BITS == 16
     66        leave
     67%endif
    5868        ret
    5969ENDPROC ASMSetXcr0
Note: See TracChangeset for help on using the changeset viewer.

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