Commit a82a8054 authored by Danilo Sabato's avatar Danilo Sabato Committed by Alessandro Rubini

arch-bare-x86-64: enable argc and argv

parent fe9b8884
......@@ -6,6 +6,16 @@
.section .boot, "ax"
.extern ppsi_main
call ppsi_clear_bss /* In C, lazy me */
call ppsi_clear_bss /* In C, lazy me */
/* inspired from uClib */
/* Pop argc and place it in the first parameter-passing register. */
popq %rdi
/* Place argv in the second parameter-passing register. */
movq %rsp, %rsi
/* Align the stack at a 16-byte boundary. */
andq $~15, %rsp
call ppsi_main
.end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment