mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-31 15:00:28 +00:00
Make improvements
- Get threads working on NetBSD - Get threads working on OpenBSD - Fix Emacs config for Emacs v28 - Improve --strace logging of sigset_t - Improve --strace logging of struct stat - Improve memory safety of DescribeThing functions - Refactor auto stack allocation into LIBC_RUNTIME - Introduce shell.com example which works on Windows - Refactor __strace_thing into DescribeThing functions - Document the CHECK macros and improve them in NDEBUG mode - Rewrite MAP_STACK so it uses FreeBSD behavior across platforms - Deprecate and discourage the use of MAP_GROWSDOWN (it's weird)
This commit is contained in:
parent
dd9ab01d25
commit
e7611a8476
101 changed files with 967 additions and 464 deletions
|
@ -21,6 +21,10 @@
|
|||
|
||||
// Code-size saving thunk for CHECK_EQ() in NDEBUG mode.
|
||||
__check_fail_eq:
|
||||
loadstr "==",dx
|
||||
lea .Lop(%rip),%r8
|
||||
jmp __check_fail_ndebug
|
||||
.endfn __check_fail_eq,globl
|
||||
|
||||
.rodata.str1.1
|
||||
.Lop: .asciz "=="
|
||||
.previous
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
// Code-size saving thunk for CHECK_GE() in NDEBUG mode.
|
||||
__check_fail_ge:
|
||||
loadstr ">=",dx
|
||||
lea .Lop(%rip),%r8
|
||||
jmp __check_fail_ndebug
|
||||
.endfn __check_fail_ge,globl
|
||||
|
||||
.rodata.str1.1
|
||||
.Lop: .asciz ">="
|
||||
.previous
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
// Code-size saving thunk for CHECK_GT() in NDEBUG mode.
|
||||
__check_fail_gt:
|
||||
loadstr ">",dx
|
||||
lea .Lop(%rip),%r8
|
||||
jmp __check_fail_ndebug
|
||||
.endfn __check_fail_gt,globl
|
||||
|
||||
.rodata.str1.1
|
||||
.Lop: .asciz ">"
|
||||
.previous
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
// Code-size saving thunk for CHECK_LE() in NDEBUG mode.
|
||||
__check_fail_le:
|
||||
loadstr "<=",dx
|
||||
lea .Lop(%rip),%r8
|
||||
jmp __check_fail_ndebug
|
||||
.endfn __check_fail_le,globl
|
||||
|
||||
.rodata.str1.1
|
||||
.Lop: .asciz "<="
|
||||
.previous
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
// Code-size saving thunk for CHECK_LT() in NDEBUG mode.
|
||||
__check_fail_lt:
|
||||
loadstr "<",dx
|
||||
lea .Lop(%rip),%r8
|
||||
jmp __check_fail_ndebug
|
||||
.endfn __check_fail_lt,globl
|
||||
|
||||
.rodata.str1.1
|
||||
.Lop: .asciz "<"
|
||||
.previous
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
||||
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi│
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
||||
│ │
|
||||
│ Permission to use, copy, modify, and/or distribute this software for │
|
||||
│ any purpose with or without fee is hereby granted, provided that the │
|
||||
│ above copyright notice and this permission notice appear in all copies. │
|
||||
│ │
|
||||
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
||||
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
||||
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
||||
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
||||
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
||||
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
__check_fail_ndebug:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
call ___check_fail_ndebug
|
||||
pop %rbp
|
||||
jmp __die # fewer elements in backtrace
|
||||
.endfn __check_fail_ndebug,globl
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
// Code-size saving thunk for CHECK_NE() in NDEBUG mode.
|
||||
__check_fail_ne:
|
||||
loadstr "!=",dx
|
||||
lea .Lop(%rip),%r8
|
||||
jmp __check_fail_ndebug
|
||||
.endfn __check_fail_ne,globl
|
||||
|
||||
.rodata.str1.1
|
||||
.Lop: .asciz "!="
|
||||
.previous
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue