This makes `zig fmt` use the same tactic as the ambiguous precedence stuff for automatically renaming packed -> bitpack. That is, the parser still emits an error for `packed`, but all such "expected 'bitpack', found 'packed'" errors are removed during `zig fmt` since the render process fixes them.
Additionally, this commit makes both packed -> bitpack and ambiguous precedence fixes work with the --stdin flag, which wasn't the case previously.
Before, loading an `f80` value into `st(0)` used `fstp st(0)` to
discard its previous contents. When the slot was empty, this
caused an x87 stack underflow and set `FE_INVALID`.
Replace the pop with `ffree st(0)` plus `fincstp`, which will
safely discard either an occupied or empty slot before loading
the new value.
On Hexagon, LLVM miscompiles reductions and bitcasts of bool vectors.
It assumes one bit per lane, while Hexagon stores comparison results with one bit per byte.
Work around this by doing these operations one element at a time.
And the tests that we previously had to skip on Hexagon now pass.
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37501
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
This is a temporary solution to the problem that today, it is normal for
multiple `std.Io` instances to coexist, and those instances can then
race to write to stderr. This makes stack traces extremely hard to read
when using `std.Progress`, to the extent that I sometimes find myself
copying stack traces into text files just to manually remove the garabge
bytes.
I suspect that this problem should ultimately be solved either by
somehow making the stderr lock truly global across all `Io` instances,
or by removing the separate "debug" `Io` instance in favour of using the
application's instance. But for the time being, this commit solves the
problem for what is currently the only common case.
This is a refactor which I've kind of been thinking of doing for a while
anyway. The LLVM backend, which emits LLVM bitcode, is now clearly
separated from the libllvm API calls, which process that bitcode into an
optimized IR/bitcode file, an assembly file, and/or an object file.
The main benefit of this change right now is that in non-incremental
compilations which use LLVM, we can now free the `llvm.Object` state
after generating bitcode and before calling into libllvm, which can
significantly decrease the peak RSS of such compilations.
Co-authored-by: Guy Fischman <gfischman@gmail.com>
Previously it is still very likely to generate
unrolled memcpy code due to dst/src being materialized
at somewhere else (like r5/r6/r7).
For these large memmove's we now explicitly force them
to be materialized to r4/r5.
Honestly, I don't even know if this is the direction to go, but considering that the term "byte-packed" and "bit-packed" have already been used before, it makes sense to me to use `bitpack` to refer to the bitpack structs and unions while using "bit-packed" when saying that something is bitpacked.