ref: ceb89c2cd04c695188993fe029698e2e1ee6d457
parent: 00e81c21f68c73403e42d08a6d5d955aa303cefd
author: Michael Forney <mforney@mforney.org>
date: Mon Jul 3 22:35:17 EDT 2017
rt: Remove duplicate stack allocation
--- a/rt/start-linux.s
+++ b/rt/start-linux.s
@@ -37,15 +37,6 @@
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 */
--- a/rt/start-netbsd.s
+++ b/rt/start-netbsd.s
@@ -45,15 +45,6 @@
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 */
--- a/rt/start-openbsd.s
+++ b/rt/start-openbsd.s
@@ -46,15 +46,6 @@
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 */