summaryrefslogtreecommitdiff
path: root/rt/start-netbsd.s
diff options
context:
space:
mode:
authorsnocl <snorredc@gmail.com>2017-12-05 21:09:39 +0100
committerOri Bernstein <ori@eigenstate.org>2017-12-05 13:31:35 -0800
commit1ed38b41793a7e5eac6c8280749ccf066577fa68 (patch)
tree30374701880dbfb8ea99add8e9e6fda68117c868 /rt/start-netbsd.s
parent858ba07669c28ac1e8e88ef0283fb71615cd86c4 (diff)
downloadmc-1ed38b41793a7e5eac6c8280749ccf066577fa68.tar.gz
Align the stack in _start.
Diffstat (limited to 'rt/start-netbsd.s')
-rw-r--r--rt/start-netbsd.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/rt/start-netbsd.s b/rt/start-netbsd.s
index a5eecc4..dd3213e 100644
--- a/rt/start-netbsd.s
+++ b/rt/start-netbsd.s
@@ -24,6 +24,7 @@ sys$__cenvp:
.globl _start
_start:
movq %rsp,%rbp
+ andq $-16,%rsp /* align the stack pointer */
/* load argc, argv, envp from stack */
movq (%rbp),%rax /* argc */