VirtualBox

Changeset 78425 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
May 7, 2019 10:15:39 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
130424
Message:

iprt/asm-amd64-x86.h: Don't use readeflags & writeeflags as they (or at least the latter) seems to confuse compiler optimizations and also is said to have other reordering issues. bugref:9180

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

Legend:

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

    r78424 r78425  
     1; $Id$
    12;; @file
    23; IPRT - ASMGetFlags().
     
    3233
    3334BEGINPROC_EXPORTED ASMGetFlags
     35%if    ARCH_BITS == 32
     36        pushfd
     37%else
    3438        pushf
    35         pop     rax
     39%endif
     40        pop     xAX
    3641        ret
    3742ENDPROC ASMGetFlags
  • trunk/src/VBox/Runtime/common/asm/ASMSetFlags.asm

    r78424 r78425  
     1; $Id$
    12;; @file
    23; IPRT - ASMSetFlags().
     
    3536; @param rcx  eflags
    3637BEGINPROC_EXPORTED ASMSetFlags
     38%if    ARCH_BITS == 64
     39 %ifdef ASM_CALL64_GCC
     40        push    rdi
     41 %else
    3742        push    rcx
     43 %endif
    3844        popfq
     45%elif  ARCH_BITS == 32
     46        push    dword [esp + 4]
     47        popfd
     48%elif  ARCH_BITS == 16
     49        push    bp
     50        mov     bp, sp
     51        push    word [bp + 2 + 2]
     52        popf
     53        leave
     54%else
     55 %error ARCH_BITS
     56%endif
    3957        ret
    4058ENDPROC ASMSetFlags
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