bootloader: Cleanup memcpy and memset
There isn't really any reason to do 32 bit moves
This commit is contained in:
parent
b30a79c7fe
commit
4212f48d7a
|
@ -306,20 +306,8 @@ memset32:
|
||||||
movw $GDT_DATA32, %dx
|
movw $GDT_DATA32, %dx
|
||||||
movw %dx, %es
|
movw %dx, %es
|
||||||
|
|
||||||
movl %ecx, %edx
|
|
||||||
|
|
||||||
andl $3, %ecx
|
|
||||||
rep stosb %es:(%edi)
|
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
|
ljmpl $GDT_CODE16, $.memset32_pmode16
|
||||||
|
|
||||||
.code16
|
.code16
|
||||||
|
@ -370,14 +358,8 @@ memcpy32:
|
||||||
movw %dx, %ds
|
movw %dx, %ds
|
||||||
movw %dx, %es
|
movw %dx, %es
|
||||||
|
|
||||||
movl %ecx, %edx
|
|
||||||
andl $3, %ecx
|
|
||||||
rep movsb %ds:(%esi), %es:(%edi)
|
rep movsb %ds:(%esi), %es:(%edi)
|
||||||
|
|
||||||
movl %edx, %ecx
|
|
||||||
shrl $2, %ecx
|
|
||||||
rep movsl %ds:(%esi), %es:(%edi)
|
|
||||||
|
|
||||||
ljmpl $GDT_CODE16, $.memcpy32_pmode16
|
ljmpl $GDT_CODE16, $.memcpy32_pmode16
|
||||||
|
|
||||||
.code16
|
.code16
|
||||||
|
|
Loading…
Reference in New Issue