Changeset 7209 in vbox
- Timestamp:
- Feb 29, 2008 1:26:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/memset.asm
r5999 r7209 37 37 %ifdef RT_ARCH_AMD64 38 38 %ifdef ASM_CALL64_MSC 39 int3 40 %error "Port me" 41 %else 39 mov r9, rdi ; save rdi in r9 40 mov rdi, rcx 41 mov r10, rcx ; the return value. 42 movzx eax, dl 43 cmp r8, 32 44 jb .dobytes 45 46 ; eax = (al << 24) | (al << 16) | (al << 8) | al; 47 ; rdx = (eax << 32) | eax 48 movzx edx, dl 49 mov rax, qword 0101010101010101h 50 imul rax, rdx 51 52 ; todo: alignment. 53 mov rcx, r8 54 shr rcx, 3 55 rep stosq 56 57 and r8, 7 58 .dobytes: 59 mov rcx, r8 60 rep stosb 61 62 mov rdi, r9 ; restore rdi 63 mov rax, r10 64 65 %else ; GCC 42 66 mov r10, rdi ; the return value. 43 67 movzx eax, sil … … 52 76 53 77 ; todo: alignment. 54 55 78 mov rcx, rdx 56 79 shr rcx, 3 … … 62 85 rep stosb 63 86 64 mov rax, r di65 %endif 87 mov rax, r10 88 %endif ; GCC 66 89 67 %else 90 %else ; X86 68 91 push edi 69 92 … … 91 114 pop edi 92 115 mov eax, [esp + 4] 93 %endif 116 %endif ; X86 94 117 ret 95 118 ENDPROC RT_NOCRT(memset)
Note:
See TracChangeset
for help on using the changeset viewer.