summaryrefslogtreecommitdiff
path: root/lib/string/i386/memmove.s
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-07-10 11:31:46 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-07-10 11:31:46 +0800
commite90b72ec3082588b296956730bd2930cf8d5d671 (patch)
tree36ff6916af9b4176ea5a9662219d11e721f0b691 /lib/string/i386/memmove.s
parent1767d390fbf3d0c65389de46caf0b6d43ef3b6ad (diff)
downloadlume-e90b72ec3082588b296956730bd2930cf8d5d671.tar.gz
lume-e90b72ec3082588b296956730bd2930cf8d5d671.tar.xz
refactor: promote new architecture to repository root
Archive the deprecated implementation under lume-legacy, make the new kernel the default root-level build, and update repository entry points without changing kernel behavior.
Diffstat (limited to 'lib/string/i386/memmove.s')
-rw-r--r--lib/string/i386/memmove.s22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/string/i386/memmove.s b/lib/string/i386/memmove.s
new file mode 100644
index 0000000..2a6a504
--- /dev/null
+++ b/lib/string/i386/memmove.s
@@ -0,0 +1,22 @@
+.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