-
-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change switches c++ exception handling from sjlj to standard dwarf. It's needed because clang for aarch64 doesn't support sjlj. It turns out that libunwind had a bare-metal configuration that made this easy to do. This change gets the new experimental cosmocc -mclang flag in a state of working so well that it can now be used to build all of llamafile and it goes 3x faster in terms of build latency, without trading away any perf. The int_fast16_t and int_fast32_t types are now always defined as 32-bit in the interest of having more abi consistency between cosmocc -mgcc and -mclang mode.
- Loading branch information
Showing
188 changed files
with
199,063 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ | ||
│ vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi │ | ||
╞══════════════════════════════════════════════════════════════════════════════╡ | ||
│ Copyright 2024 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. │ | ||
╚─────────────────────────────────────────────────────────────────────────────*/ | ||
|
||
__attribute__((__weak__)) void __gxx_personality_v0() { | ||
__builtin_trap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_AMMINTRIN_INTERNAL_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_AMMINTRIN_INTERNAL_H_ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/ammintrin.h" | ||
#else | ||
#include "third_party/intel/ammintrin.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_AMMINTRIN_INTERNAL_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/amxcomplexintrin.h" | ||
#else | ||
#include "third_party/intel/amxcomplexintrin.internal.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/amxfp16intrin.h" | ||
#else | ||
#include "third_party/intel/amxfp16intrin.internal.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_ACLE_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_ACLE_H_ | ||
#ifdef __clang__ | ||
#include "third_party/aarch64/clang/arm_acle.h" | ||
#else | ||
#include "third_party/aarch64/arm_acle.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_ACLE_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_BF16_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_BF16_H_ | ||
#ifdef __clang__ | ||
#include "third_party/aarch64/clang/arm_bf16.h" | ||
#else | ||
#include "third_party/aarch64/arm_bf16.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_BF16_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_FP16_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_FP16_H_ | ||
#ifdef __clang__ | ||
#include "third_party/aarch64/clang/arm_fp16.h" | ||
#else | ||
#include "third_party/aarch64/arm_fp16.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_FP16_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_NEON_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_NEON_H_ | ||
#ifdef __clang__ | ||
#include "third_party/aarch64/clang/arm_neon.h" | ||
#else | ||
#include "third_party/aarch64/arm_neon.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_NEON_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_SVE_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_SVE_H_ | ||
#ifdef __clang__ | ||
#include "third_party/aarch64/clang/arm_sve.h" | ||
#else | ||
#include "third_party/aarch64/arm_sve.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_SVE_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_VECTOR_TYPES_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_VECTOR_TYPES_H_ | ||
#ifdef __clang__ | ||
#include "third_party/aarch64/clang/arm_vector_types.h" | ||
#else | ||
#include "third_party/aarch64/arm_vector_types.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_VECTOR_TYPES_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/avxifmaintrin.h" | ||
#else | ||
#include "third_party/intel/avxifmaintrin.internal.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/avxneconvertintrin.h" | ||
#else | ||
#include "third_party/intel/avxneconvertintrin.internal.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/avxvnniint16intrin.h" | ||
#else | ||
#include "third_party/intel/avxvnniint16intrin.internal.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/avxvnniint8intrin.h" | ||
#else | ||
#include "third_party/intel/avxvnniint8intrin.internal.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CLZEROINTRIN_INTERNAL_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_CLZEROINTRIN_INTERNAL_H_ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/clzerointrin.h" | ||
#else | ||
#include "third_party/intel/clzerointrin.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CLZEROINTRIN_INTERNAL_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/cmpccxaddintrin.h" | ||
#else | ||
#include "third_party/intel/cmpccxaddintrin.internal.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_EMMINTRIN_INTERNAL_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_EMMINTRIN_INTERNAL_H_ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/emmintrin.h" | ||
#else | ||
#include "third_party/intel/emmintrin.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_EMMINTRIN_INTERNAL_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_IMMINTRIN_INTERNAL_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_IMMINTRIN_INTERNAL_H_ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/immintrin.h" | ||
#else | ||
#include "third_party/intel/immintrin.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_IMMINTRIN_INTERNAL_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_MM_MALLOC_INTERNAL_H_ | ||
#define COSMOPOLITAN_LIBC_ISYSTEM_MM_MALLOC_INTERNAL_H_ | ||
#ifdef __clang__ | ||
#include "third_party/intel/clang/mm_malloc.h" | ||
#else | ||
#include "third_party/intel/mm_malloc.internal.h" | ||
#endif | ||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_MM_MALLOC_INTERNAL_H_ */ |
Oops, something went wrong.