Improve dead code elimination

This commit is contained in:
Justine Tunney 2021-02-08 04:04:42 -08:00
parent 760db8c5ad
commit 0e36cb3ac4
6606 changed files with 9685 additions and 9854 deletions

View file

@ -21,19 +21,20 @@
#include "libc/notice.inc"
#include "libc/runtime/internal.h"
.section .start,"ax",@progbits
.source __FILE__
nop
.align 16
/ System Five userspace program entrypoint.
/
/ @param rsp is [n,argv₀..argvₙ₋₁,0,envp₀..,0,auxv₀..,0,..]
/ @note FreeBSD is special (see freebsd/lib/csu/amd64/...)
/ @noreturn
_start: test %rdi,%rdi
_start:
#if SupportsFreebsd()
test %rdi,%rdi
cmovnz %rdi,%rsp
jz 0f
movb $FREEBSD,__hostos(%rip)
#endif
0: mov (%rsp),%ebx # argc
lea 8(%rsp),%rsi # argv
lea 24(%rsp,%rbx,8),%rdx # envp