summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-07-04 02:35:17 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-04 23:27:34 -0700
commitceb89c2cd04c695188993fe029698e2e1ee6d457 (patch)
tree62648ae146d7830a135af3648d7e925ebfa5aaa7 /rt
parent00e81c21f68c73403e42d08a6d5d955aa303cefd (diff)
downloadmc-ceb89c2cd04c695188993fe029698e2e1ee6d457.tar.gz
rt: Remove duplicate stack allocation
Diffstat (limited to 'rt')
-rw-r--r--rt/start-linux.s9
-rw-r--r--rt/start-netbsd.s9
-rw-r--r--rt/start-openbsd.s9
3 files changed, 0 insertions, 27 deletions
diff --git a/rt/start-linux.s b/rt/start-linux.s
index 8c72269..fcc7de1 100644
--- a/rt/start-linux.s
+++ b/rt/start-linux.s
@@ -37,15 +37,6 @@ _start:
subq %rax,%rsp
movq %rsp, %rdx /* saved args[:] */
- /* stack allocate sizeof(byte[:])*(argc + len(envp)) */
- movq (%rbp),%rax
- leaq 16(%rbp,%rax,8), %rbx /* argp = argv + 8*argc + 8 */
- call count
- addq %r9,%rax
- imulq $16,%rax
- subq %rax,%rsp
- movq %rsp, %rdx /* saved args[:] */
-
/* convert envp to byte[:][:] for sys._environment */
movq (%rbp),%rax
leaq 16(%rbp,%rax,8), %rbx /* envp = argv + 8*argc + 8 */
diff --git a/rt/start-netbsd.s b/rt/start-netbsd.s
index d78559e..bd2d576 100644
--- a/rt/start-netbsd.s
+++ b/rt/start-netbsd.s
@@ -45,15 +45,6 @@ _start:
subq %rax,%rsp
movq %rsp, %rdx /* saved args[:] */
- /* stack allocate sizeof(byte[:])*(argc + len(envp)) */
- movq (%rbp),%rax
- leaq 16(%rbp,%rax,8), %rbx /* argp = argv + 8*argc + 8 */
- call count
- addq %r9,%rax
- imulq $16,%rax
- subq %rax,%rsp
- movq %rsp, %rdx /* saved args[:] */
-
/* convert envp to byte[:][:] for sys._environment */
movq (%rbp),%rax
leaq 16(%rbp,%rax,8), %rbx /* envp = argv + 8*argc + 8 */
diff --git a/rt/start-openbsd.s b/rt/start-openbsd.s
index c278ab0..663d865 100644
--- a/rt/start-openbsd.s
+++ b/rt/start-openbsd.s
@@ -46,15 +46,6 @@ _start:
subq %rax,%rsp
movq %rsp, %rdx /* saved args[:] */
- /* stack allocate sizeof(byte[:])*(argc + len(envp)) */
- movq (%rbp),%rax
- leaq 16(%rbp,%rax,8), %rbx /* argp = argv + 8*argc + 8 */
- call count
- addq %r9,%rax
- imulq $16,%rax
- subq %rax,%rsp
- movq %rsp, %rdx /* saved args[:] */
-
/* convert envp to byte[:][:] for sys._environment */
movq (%rbp),%rax
leaq 16(%rbp,%rax,8), %rbx /* envp = argv + 8*argc + 8 */