Changeset 83886 in vbox for trunk/src/VBox/Runtime/common/string/RTStrEnd.asm
- Timestamp:
- Apr 21, 2020 11:14:20 AM (5 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/RTStrEnd.asm
r83872 r83886 1 1 ; $Id$ 2 2 ;; @file 3 ; IPRT - No-CRT memchr- AMD64 & X86.3 ; IPRT - RTStrEnd - AMD64 & X86. 4 4 ; 5 5 … … 30 30 31 31 ;; 32 ; @param p v gcc: rdi msc: ecx x86:[esp+4] wcall: eax33 ; @param c h gcc: esi msc: edx x86:[esp+8] wcall: edx34 ; @param cb gcc: rdx msc: r8 x86:[esp+0ch] wcall: ebx35 RT_NOCRT_BEGINPROC memchr 32 ; @param pszString gcc: rdi msc: rcx x86:[esp+4] wcall: eax 33 ; @param cchMax gcc: rsi msc: rdx x86:[esp+8] wcall: edx 34 ; 35 BEGINPROC_EXPORTED RTStrEnd 36 36 cld 37 37 %ifdef RT_ARCH_AMD64 38 38 %ifdef ASM_CALL64_MSC 39 or r 8, r839 or rdx, rdx 40 40 jz .not_found_early 41 41 42 42 mov r9, rdi ; save rdi 43 mov eax, edx44 43 mov rdi, rcx 45 mov rcx, r 844 mov rcx, rdx 46 45 %else 47 mov rcx, r dx46 mov rcx, rsi 48 47 jrcxz .not_found_early 49 50 mov eax, esi51 48 %endif 52 49 53 50 %else 54 51 %ifdef ASM_CALL32_WATCOM 55 mov ecx, e bx52 mov ecx, edx 56 53 jecxz .not_found_early 57 xchg eax, edx58 xchg edi, edx ; load and save edi.54 mov edx, edi ; save rdi 55 mov edi, eax 59 56 %else 60 mov ecx, [esp + 0ch]57 mov ecx, [esp + 8] 61 58 jecxz .not_found_early 62 59 mov edx, edi ; save edi 63 mov eax, [esp + 8]64 60 mov edi, [esp + 4] 65 61 %endif 66 62 %endif 63 xor eax, eax ; we're searching for zero 67 64 68 65 ; do the search … … 90 87 xor eax, eax 91 88 ret 92 ENDPROC RT _NOCRT(memchr)89 ENDPROC RTStrEnd 93 90
Note:
See TracChangeset
for help on using the changeset viewer.