Changeset 75129 in vbox for trunk/src/VBox/Runtime/common/string/watcom/memcpy.asm
- Timestamp:
- Oct 28, 2018 5:00:27 PM (6 years ago)
- Location:
- trunk/src/VBox/Runtime/common/string/watcom
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/watcom/memcpy.asm
r75123 r75129 1 1 ; $Id$ 2 2 ;; @file 3 ; IPRT - No-CRT memcpy - AMD64 & X86.3 ; IPRT - No-CRT memcpy - 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/memcpy.asm" 30 32 31 ;;32 ; @param pvDst gcc: rdi msc: rcx x86:[esp+4]33 ; @param pvSrc gcc: rsi msc: rdx x86:[esp+8]34 ; @param cb gcc: rdx msc: r8 x86:[esp+0ch]35 RT_NOCRT_BEGINPROC memcpy36 cld37 38 ; Do the bulk of the work.39 %ifdef RT_ARCH_AMD6440 %ifdef ASM_CALL64_MSC41 mov r10, rdi ; save42 mov r11, rsi ; save43 mov rdi, rcx44 mov rsi, rdx45 mov rcx, r846 mov rdx, r847 %else48 mov rcx, rdx49 %endif50 mov rax, rdi ; save the return value51 shr rcx, 352 rep movsq53 %else54 push edi55 push esi56 57 mov ecx, [esp + 0ch + 8]58 mov edi, [esp + 04h + 8]59 mov esi, [esp + 08h + 8]60 mov edx, ecx61 mov eax, edi ; save the return value62 shr ecx, 263 rep movsd64 %endif65 66 ; The remaining bytes.67 %ifdef RT_ARCH_AMD6468 test dl, 469 jz .dont_move_dword70 movsd71 %endif72 .dont_move_dword:73 test dl, 274 jz .dont_move_word75 movsw76 .dont_move_word:77 test dl, 178 jz .dont_move_byte79 movsb80 .dont_move_byte:81 82 %ifdef RT_ARCH_AMD6483 %ifdef ASM_CALL64_MSC84 mov rdi, r1085 mov rsi, r1186 %endif87 %else88 pop esi89 pop edi90 %endif91 ret92 ENDPROC RT_NOCRT(memcpy)93
Note:
See TracChangeset
for help on using the changeset viewer.