grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MULTIBOOT2 SPEC PATCH v4 17/27] multiboot2: Clean up stack (cdecl calli


From: Hans Ulrich Niedermann
Subject: [MULTIBOOT2 SPEC PATCH v4 17/27] multiboot2: Clean up stack (cdecl calling conventions)
Date: Fri, 15 May 2020 05:43:40 +0200

Clean up the stack after calling C functions according to the
i386 cdecl calling conventions.

Signed-off-by: Hans Ulrich Niedermann <address@hidden>

diff --git a/doc/boot_i386.S b/doc/boot_i386.S
index 20a600a6e..14dc14660 100644
--- a/doc/boot_i386.S
+++ b/doc/boot_i386.S
@@ -101,10 +101,12 @@ multiboot_entry:
 
        /* Now enter the C main function...  */
        call    EXT_C(cmain)
+       addl    $8, %esp
 
        /* Halt.  */
        pushl   $halt_message
        call    EXT_C(printf)
+       addl    $4, %esp
        
 loop:  hlt
        jmp     loop
-- 
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]