mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 17:18:28 +08:00
arch/x86_64: replaced loop construct with rep movsb
Replaces inefficient loop construct with rep movsb string instruction. Signed-off-by: cqb <cqb@sideways.engineering>
This commit is contained in:
@@ -54,15 +54,9 @@ _start:
|
||||
movl $realmode_start, %esi
|
||||
movl $0, %edi
|
||||
|
||||
copy_loop:
|
||||
|
||||
/* Copy by bytes, make sure the addresses are not overlapped */
|
||||
|
||||
movb (%esi), %al
|
||||
movb %al, (%edi)
|
||||
inc %esi
|
||||
inc %edi
|
||||
loop copy_loop
|
||||
cld
|
||||
rep movsb
|
||||
|
||||
/* Jump to bin_start + 0x30, skip the multiboot1 header */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user