Changeset 75129 in vbox for trunk/src/VBox/Runtime/common/string/watcom/strcmp.asm
- Timestamp:
- Oct 28, 2018 5:00:27 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126206
- Location:
- trunk/src/VBox/Runtime/common/string/watcom
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/watcom/strcmp.asm
r75123 r75129 1 1 ; $Id$ 2 2 ;; @file 3 ; IPRT - No-CRT strcmp - AMD64 & X86.3 ; IPRT - No-CRT strcmp - Watcom register calling convention. 4 4 ; 5 5 … … 27 27 %include "iprt/asmdefs.mac" 28 28 29 BEGINCODE 29 %define ASM_CALL32_WATCOM 30 %define NAME(name) name %+ _ 31 %include "common/string/strcmp.asm" 30 32 31 ;;32 ; @param psz1 gcc: rdi msc: rcx x86:[esp+4]33 ; @param psz2 gcc: rsi msc: rdx x86:[esp+8]34 RT_NOCRT_BEGINPROC strcmp35 ; input36 %ifdef RT_ARCH_AMD6437 %ifdef ASM_CALL64_MSC38 %define psz1 rcx39 %define psz2 rdx40 %else41 %define psz1 rdi42 %define psz2 rsi43 %endif44 %else45 mov ecx, [esp + 4]46 mov edx, [esp + 8]47 %define psz1 ecx48 %define psz2 edx49 %endif50 51 ;52 ; The loop.53 ;54 .next:55 mov al, [psz1]56 mov ah, [psz2]57 cmp al, ah58 jne .not_equal59 test al, al60 jz .equal61 62 mov al, [psz1 + 1]63 mov ah, [psz2 + 1]64 cmp al, ah65 jne .not_equal66 test al, al67 jz .equal68 69 mov al, [psz1 + 2]70 mov ah, [psz2 + 2]71 cmp al, ah72 jne .not_equal73 test al, al74 jz .equal75 76 mov al, [psz1 + 3]77 mov ah, [psz2 + 3]78 cmp al, ah79 jne .not_equal80 test al, al81 jz .equal82 83 add psz1, 484 add psz2, 485 jmp .next86 87 .equal:88 xor eax, eax89 ret90 91 .not_equal:92 movzx ecx, ah93 and eax, 0ffh94 sub eax, ecx95 ret96 ENDPROC RT_NOCRT(strcmp)97
Note:
See TracChangeset
for help on using the changeset viewer.