From 4212f48d7aeb4b16df544a368c61d0dac053626a Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 6 Feb 2025 20:56:35 +0200 Subject: [PATCH] bootloader: Cleanup memcpy and memset There isn't really any reason to do 32 bit moves --- bootloader/bios/utils.S | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/bootloader/bios/utils.S b/bootloader/bios/utils.S index 369a2d3b..9372cc89 100644 --- a/bootloader/bios/utils.S +++ b/bootloader/bios/utils.S @@ -306,20 +306,8 @@ memset32: movw $GDT_DATA32, %dx movw %dx, %es - movl %ecx, %edx - - andl $3, %ecx rep stosb %es:(%edi) - movl %edx, %ecx - shrl $2, %ecx - - movb %al, %ah - movw %ax, %dx - shll $16, %eax - movw %dx, %ax - rep stosl %es:(%edi) - ljmpl $GDT_CODE16, $.memset32_pmode16 .code16 @@ -370,14 +358,8 @@ memcpy32: movw %dx, %ds movw %dx, %es - movl %ecx, %edx - andl $3, %ecx rep movsb %ds:(%esi), %es:(%edi) - movl %edx, %ecx - shrl $2, %ecx - rep movsl %ds:(%esi), %es:(%edi) - ljmpl $GDT_CODE16, $.memcpy32_pmode16 .code16