diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-10-16 02:39:56 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-10-16 02:39:56 +0800 |
| commit | 8cace3f05003c6cb4d38c36890055f03151c2ad4 (patch) | |
| tree | aa739deaac0266f17c4e91b333957501cb1ea2e9 /lib/string/i386 | |
| parent | 3ad39e9878310e5317ee73c9b353c1e2c1c5c4ee (diff) | |
| download | lume-8cace3f05003c6cb4d38c36890055f03151c2ad4.tar.gz lume-8cace3f05003c6cb4d38c36890055f03151c2ad4.tar.xz | |
Remove old code
Signed-off-by: Richard Qin <richard.qin.x@gmail.com>
Diffstat (limited to 'lib/string/i386')
| -rw-r--r-- | lib/string/i386/memcpy.s | 32 | ||||
| -rw-r--r-- | lib/string/i386/memmove.s | 22 | ||||
| -rw-r--r-- | lib/string/i386/memset.s | 76 |
3 files changed, 0 insertions, 130 deletions
diff --git a/lib/string/i386/memcpy.s b/lib/string/i386/memcpy.s deleted file mode 100644 index 0608dd8..0000000 --- a/lib/string/i386/memcpy.s +++ /dev/null @@ -1,32 +0,0 @@ -.global memcpy -.global __memcpy_fwd -.hidden __memcpy_fwd -.type memcpy,@function -memcpy: -__memcpy_fwd: - push %esi - push %edi - mov 12(%esp),%edi - mov 16(%esp),%esi - mov 20(%esp),%ecx - mov %edi,%eax - cmp $4,%ecx - jc 1f - test $3,%edi - jz 1f -2: movsb - dec %ecx - test $3,%edi - jnz 2b -1: mov %ecx,%edx - shr $2,%ecx - rep - movsl - and $3,%edx - jz 1f -2: movsb - dec %edx - jnz 2b -1: pop %edi - pop %esi - ret diff --git a/lib/string/i386/memmove.s b/lib/string/i386/memmove.s deleted file mode 100644 index 2a6a504..0000000 --- a/lib/string/i386/memmove.s +++ /dev/null @@ -1,22 +0,0 @@ -.global memmove -.type memmove,@function -memmove: - mov 4(%esp),%eax - sub 8(%esp),%eax - cmp 12(%esp),%eax -.hidden __memcpy_fwd - jae __memcpy_fwd - push %esi - push %edi - mov 12(%esp),%edi - mov 16(%esp),%esi - mov 20(%esp),%ecx - lea -1(%edi,%ecx),%edi - lea -1(%esi,%ecx),%esi - std - rep movsb - cld - lea 1(%edi),%eax - pop %edi - pop %esi - ret diff --git a/lib/string/i386/memset.s b/lib/string/i386/memset.s deleted file mode 100644 index d00422c..0000000 --- a/lib/string/i386/memset.s +++ /dev/null @@ -1,76 +0,0 @@ -.global memset -.type memset,@function -memset: - mov 12(%esp),%ecx - cmp $62,%ecx - ja 2f - - mov 8(%esp),%dl - mov 4(%esp),%eax - test %ecx,%ecx - jz 1f - - mov %dl,%dh - - mov %dl,(%eax) - mov %dl,-1(%eax,%ecx) - cmp $2,%ecx - jbe 1f - - mov %dx,1(%eax) - mov %dx,(-1-2)(%eax,%ecx) - cmp $6,%ecx - jbe 1f - - shl $16,%edx - mov 8(%esp),%dl - mov 8(%esp),%dh - - mov %edx,(1+2)(%eax) - mov %edx,(-1-2-4)(%eax,%ecx) - cmp $14,%ecx - jbe 1f - - mov %edx,(1+2+4)(%eax) - mov %edx,(1+2+4+4)(%eax) - mov %edx,(-1-2-4-8)(%eax,%ecx) - mov %edx,(-1-2-4-4)(%eax,%ecx) - cmp $30,%ecx - jbe 1f - - mov %edx,(1+2+4+8)(%eax) - mov %edx,(1+2+4+8+4)(%eax) - mov %edx,(1+2+4+8+8)(%eax) - mov %edx,(1+2+4+8+12)(%eax) - mov %edx,(-1-2-4-8-16)(%eax,%ecx) - mov %edx,(-1-2-4-8-12)(%eax,%ecx) - mov %edx,(-1-2-4-8-8)(%eax,%ecx) - mov %edx,(-1-2-4-8-4)(%eax,%ecx) - -1: ret - -2: movzbl 8(%esp),%eax - mov %edi,12(%esp) - imul $0x1010101,%eax - mov 4(%esp),%edi - test $15,%edi - mov %eax,-4(%edi,%ecx) - jnz 2f - -1: shr $2, %ecx - rep - stosl - mov 4(%esp),%eax - mov 12(%esp),%edi - ret - -2: xor %edx,%edx - sub %edi,%edx - and $15,%edx - mov %eax,(%edi) - mov %eax,4(%edi) - mov %eax,8(%edi) - mov %eax,12(%edi) - sub %edx,%ecx - add %edx,%edi - jmp 1b |
