VirtualBox

Ignore:
Timestamp:
Nov 18, 2015 8:47:23 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
104194
Message:

IPRT: Morphed ASMBitFirstClear.asm into ASMBitFirstSet.asm, and fixing 16-bit return bug.

File:
1 edited

Legend:

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

    r58746 r58753  
    9393        xor     eax, [edi]              ; eax = NOT [rdi]
    9494%endif
    95         jz      .failed_restore         ; race paranoia
    9695        sub     xDI, xDX
    9796        shl     edi, 3                  ; calc bit offset.
    9897
    99         mov     ecx, 0ffffffffh
    10098        bsf     ecx, eax
     99        jz      .failed_restore         ; race paranoia
    101100        add     ecx, edi
    102101        mov     eax, ecx
     
    105104        pop     xDI
    106105%if ARCH_BITS == 16
     106        mov     edx, eax
     107        shr     edx, 16
    107108        leave
    108109%endif
     
    114115.failed_restore:
    115116        pop     xDI
    116 %if ARCH_BITS == 16
    117         mov     edx, eax
    118         shr     edx, 16
    119         leave
    120 %endif
    121         ret
    122 
    123117.failed:
    124118%if ARCH_BITS != 16
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