:: commit 585ca35f47a28af6515f0b27ee499eb377ddaa97

mintsuki <mintsuki@protonmail.com> — 2024-06-26 18:00

parents: 7e49a328d7

lib/mem: Remove unused memcpy32to64() function

diff --git a/common/lib/mem.s2.asm_ia32 b/common/lib/mem.s2.asm_ia32
index 9875b5b2..a23f685d 100644
--- a/common/lib/mem.s2.asm_ia32
+++ b/common/lib/mem.s2.asm_ia32
@@ -74,38 +74,4 @@ memcmp:
     pop esi
     ret
 
-global memcpy32to64
-memcpy32to64:
-    push ebp
-    mov ebp, esp
-
-    push esi
-    push edi
-
-    push 0x28
-    call .p1
-  .p1:
-    add dword [esp], .mode64 - .p1
-    retfd
-
-bits 64
-  .mode64:
-    mov rdi, [rbp + 8]
-    mov rsi, [rbp + 16]
-    mov rcx, [rbp + 24]
-    rep movsb
-
-    push 0x18
-    call .p2
-  .p2:
-    add qword [rsp], .mode32 - .p2
-    retfq
-
-bits 32
-  .mode32:
-    pop edi
-    pop esi
-    pop ebp
-    ret
-
 section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/misc.h b/common/lib/misc.h
index e48d7bb9..7b3851c4 100644
--- a/common/lib/misc.h
+++ b/common/lib/misc.h
@@ -58,14 +58,6 @@ int pit_sleep_and_quit_on_keypress(int seconds);
 
 uint64_t strtoui(const char *s, const char **end, int base);
 
-#if defined (__i386__)
-void memcpy32to64(uint64_t, uint64_t, uint64_t);
-#elif defined (__x86_64__) || defined (__aarch64__) || defined(__riscv64)
-#  define memcpy32to64(X, Y, Z) memcpy((void *)(uintptr_t)(X), (void *)(uintptr_t)(Y), Z)
-#else
-#error Unknown architecture
-#endif
-
 #define DIV_ROUNDUP(a, b) ({ \
     __auto_type DIV_ROUNDUP_a = (a); \
     __auto_type DIV_ROUNDUP_b = (b); \
tab: 248 wrap: offon