mirror of
https://github.com/apache/nuttx.git
synced 2026-09-14 22:50:25 +00: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:
parent
3fb776e45c
commit
7b1e9eb8bc
1 changed files with 2 additions and 8 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue