30 Commits

Author SHA1 Message Date
Alex Rønne Petersen
d2a038c082
stage1: update zig1.wasm
Needed because some std.Target.aarch64 features were renamed in LLVM 21.

Signed-off-by: Alex Rønne Petersen <alex@alexrp.com>
2025-08-30 13:27:25 +02:00
Jacob Young
13392ad33f stage1: update zig1.wasm
Compiler needs a subset of the legalization features enabled.
2025-06-15 11:55:57 -04:00
Jacob Young
cc047fdd95
stage1: update zig1.wasm
Compiler needs cbe reserved identifier change. This also allows us to
delete the old `@intCast` panic handler declarations from the standard
library.
2025-06-01 12:10:57 +01:00
Alex Rønne Petersen
c85534a5c6 stage1: Update zig1.wasm.
Signed-off-by: Alex Rønne Petersen <alex@alexrp.com>
2025-03-27 17:43:05 +01:00
Alex Rønne Petersen
f90f8f59a5
stage1: Update zig1.wasm.
Signed-off-by: Alex Rønne Petersen <alex@alexrp.com>
2025-02-17 19:18:20 +01:00
mlugg
0cc9d68b77
stage1: update zig1.wasm
Implementing the changes from the prior commit, to prepare for the
following commit.

This also means that zig1 now uses the new value interpret mode, so
that adding and removing fields from `std.builtin` types is easier.

Signed-off-by: mlugg <mlugg@mlugg.co.uk>
2025-01-16 12:49:58 +00:00
Alex Rønne Petersen
6b2c8fc688 zig.h: Improve portability of zig_*_windows_teb() helpers.
* Make it work for thumb and aarch64.
* Clean up std.os.windows.teb() a bit.

I also updated stage1/zig.h since the changes are backwards-compatible and are
necessary due to the std.os.windows changes that call the newly-added functions.
2024-11-04 11:59:38 +01:00
mlugg
36405b9b43
stage1: update zig1.wasm
As well as being necessary for the `CallingConvention` changes, this
update includes the following notable changes:

* Fix unlabeled `break` targeting the wrong scope in the presence of
  labeled continue, unblocking #21422
* Implement `@FieldType`
* Implement `@splat` on arrays

Signed-off-by: mlugg <mlugg@mlugg.co.uk>
2024-10-19 19:13:41 +01:00
kcbanner
2a0238e5e3 zig.h: fixup pointer atomic load definitions 2024-07-26 10:42:10 -04:00
kcbanner
c318710653 zig.h: expand zig_msvc_atomic_load_ into version for relaxed, acquire, and seq_cst 2024-07-13 19:45:45 -04:00
kcbanner
bc28454b43 zig.h: replace _InterlockedExchangeAdd with a plain volatile load
This was causing zig2.exe to crash during bootstrap, because there was an atomic
load of read-only memory, and the attempt to write to it as part of the (idempotent)
atomic exchange was invalid.

Aligned reads (of u32 / u64) are atomic on x86 / x64, so this is replaced with an
optimization-proof load (`__iso_volatile_load8*`) and a reordering barrier.
2024-07-13 17:46:24 -04:00
kcbanner
0d12caee29 - Fix ypedef -> typedef 2024-06-21 00:12:13 -04:00
Andrew Kelley
80f38c0cbb update zig1.wasm
In particular, contains fixes to the C backend that avoid tripping UBSAN
in clang 18.
2024-05-08 19:37:29 -07:00
Jacob Young
e5ba70bb5c update zig1.wasm
Removes the first argument of `@fieldParentPtr`.
2024-03-30 20:54:53 -04:00
Jacob Young
edeed592ee update zig1.wasm
Removes `std.builtin.Type.Fn.alignment`.
2024-03-17 03:25:56 +01:00
Jacob Young
0dbaa8d3ae zig.h: workaround for gcc f128 miscompilations 2023-11-12 17:30:24 -07:00
Andrew Kelley
9763573ebb
update zig1.wasm
Needed because the compiler used the now removed `@fabs` builtin and
instead depends on the new `@abs` builtin.
2023-09-27 11:30:02 -07:00
Andrew Kelley
6bd54a1d3e
update zig1.wasm
Notable changes in this update:

127198e58cb3dcf2d2287124cf15a23a7d3a9c02 fixes building zig2 artifact on
macOS Sonoma 14.0 (more specifically the SDK 14.0 linker).

a8d2ed806558cc1472f3a532169a4994abe17833 fixed some alignment edge
cases which is needed to do the store_hash=false change in the compiler
source code.

df5f0517b33b5f7bc2a508cf6a0ee62246f02d21 preserves result type
information through the address-of operator.
2023-09-24 15:54:33 -07:00
mlugg
3e1b676ac1
stage1: update zig1
This is necessary due to the CBE fixes in the previous commit.

Signed-off-by: Andrew Kelley <andrew@ziglang.org>
2023-08-20 12:40:10 -07:00
Andrew Kelley
47d5bf2616 update zig1.wasm
Needed due to the breaking changes to `@splat` which are used by the
self-hosted compiler.

This update also includes the improvement that allows casting builtins
to infer the result type through optionals and error unions.
2023-07-12 15:50:57 -07:00
Jacob Young
78eb3c5617 bootstrap: support aarch64 in 32-bit mode
* `CMakeLists.txt`: support the weird `uname -m` output.
 * `CMakeLists.txt`: detect and use the C compiler's default arm mode.
 * cbe: support gcc with both `f128` and `u128` emulated.
 * std.os.linux.thumb: fix incorrectly passed asm inputs.
2023-07-04 15:47:07 -07:00
mlugg
22c6b6c9a9 Update zig1.wasm
This is needed in order to remove math.{min,max} from std in favour of
the builtins, since the builtins need the behavior fix from the previous
commit.

Note from Andrew: I updated this commit with zig1.wasm built by me.

Signed-off-by: Andrew Kelley <andrew@ziglang.org>
2023-06-16 13:43:32 -07:00
Andrew Kelley
fa200ca0ca update zig1.wasm
This is needed because bug fixes to the C backend are required in order
to actually update the standard library and compiler sources to use the
new `@memcpy` and `@memset` semantics.
2023-04-28 13:29:39 -07:00
Andrew Kelley
3878586821 update zig1.wasm 2023-04-23 13:33:20 -07:00
Andrew Kelley
aa45854ec3 zig.h: fix typo for zig_trap definition 2023-04-08 09:54:32 -07:00
Andrew Kelley
ef5afbfcf4 zig.h: f16 fix for compiler_rt
See #15092
2023-04-06 08:40:02 -07:00
Andrew Kelley
eb19f73af5 update zig1.wasm 2023-04-05 23:27:50 -07:00
Lavt Niveau
5a26d1b426
Include signal.h to define SIGTRAP in Stage 1 compiler (#14867)
copy lib/zig.h to stage1/zig.h

In this case, it looks safe to backport over with no changes.

Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2023-03-10 13:36:43 +00:00
Andrew Kelley
cdb9cc8f6b update zig1.wasm 2023-03-05 17:29:28 -07:00
Jacob Young
3eed197c95 CBE: use stdint.h types instead of zig_ prefixes
This requires manual defines before C99 which may not have stdint.h.

Also have update-zig1 leave a copy of lib/zig.h in stage1/zig.h, which
allows lib/zig.h to be updated without needing to update zig1.wasm.
Note that since the object already existed with the exact same contents,
this completely avoids repo bloat due to zig.h changes.
2023-02-20 23:59:48 -05:00