From 32ba4d07e2e418a57b711ba3fb0fe72987ea07ce Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 5 Sep 2024 12:59:05 +0300 Subject: [PATCH] Userspace: Remove unnecessary mov instruction from crt0 --- userspace/libraries/LibC/arch/i686/crt0.S | 3 +-- userspace/libraries/LibC/arch/x86_64/crt0.S | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/userspace/libraries/LibC/arch/i686/crt0.S b/userspace/libraries/LibC/arch/i686/crt0.S index 0e6dfbf5..50d635ff 100644 --- a/userspace/libraries/LibC/arch/i686/crt0.S +++ b/userspace/libraries/LibC/arch/i686/crt0.S @@ -23,8 +23,7 @@ _start: movl $__init_array_start, %ebx jmp 2f - 1: movl (%ebx), %eax - call *%eax + 1: call *(%ebx) addl $4, %ebx 2: cmpl $__init_array_end, %ebx jne 1b diff --git a/userspace/libraries/LibC/arch/x86_64/crt0.S b/userspace/libraries/LibC/arch/x86_64/crt0.S index 324c5bb2..46d83cdc 100644 --- a/userspace/libraries/LibC/arch/x86_64/crt0.S +++ b/userspace/libraries/LibC/arch/x86_64/crt0.S @@ -24,8 +24,7 @@ _start: movq $__init_array_start, %rbx jmp 2f - 1: movq (%rbx), %rax - call *%rax + 1: call *(%rbx) addq $8, %rbx 2: cmpq $__init_array_end, %rbx jne 1b