23982 Commits

Author SHA1 Message Date
Andrew Kelley
5569e6b49d
Merge pull request #15639 from jacobly0/signed-mod
llvm/cbe: fix signed `@mod`/`@divFloor` computations
2023-05-11 08:36:33 -07:00
Andrew Kelley
c857959372
Merge pull request #15640 from jacobly0/min-max
llvm: fix `@max`/`@min` of unsupported float types
2023-05-11 08:35:08 -07:00
Veikka Tuominen
d761e6cc7d fix formatting in darwin.zig 2023-05-11 14:59:19 +03:00
frmdstryr
0ad692e76c
compiler_rt: fix ARM memset signatures 2023-05-11 11:33:47 +03:00
John Schmidt
2606498409 module: return null if no candidate src
Closes #15572.
2023-05-11 11:21:44 +03:00
David CARLIER
20cc69318f std.c: darwin adding more host_info api data 2023-05-11 11:21:07 +03:00
Jacob Young
716d6a026f std: revert comptime_float support
Removed since I'm aware of some design considerations of `comptime_float`.
2023-05-10 15:16:50 -04:00
Jacob Young
c5b96c7447 llvm: fix @max/@min of unsupported float types
Closes #15611
2023-05-10 15:16:50 -04:00
Jacob Young
2e6a6d7564 llvm/cbe: fix signed @mod/@divFloor computations
Closes #15636
2023-05-10 15:11:52 -04:00
Jacob Young
31a13ce2e3 cbe: use Assignment in airSplat 2023-05-10 15:11:52 -04:00
Loris Cro
2d2d79a05b autodoc: fix crash when call syntax has complex callee expression 2023-05-10 21:07:40 +02:00
Meghan
ac385bd8a6 std.fmt.parseIntSizeSuffix: add R and Q
https://www.nist.gov/pml/owm/metric-si-prefixes

https://www.npl.co.uk/si-prefix
2023-05-10 20:11:18 +03:00
David CARLIER
cd7e2bf57a std.c: adding freebsd's ioctl base operands. 2023-05-10 19:14:51 +03:00
Kyle Coffey
ebc3773542
Add std.mem.indexOfNone
This introduces a parallel set of functions to the std.mem.indexOfAny
functions. They simply invert the logic, yielding the first/last index
which is *not* contained in the "values" slice.

Inverting this logic is useful when you are attempting to determine the
initial span which contains only characters in a particular set.

* Document the `indexOfNone` family.

These descriptions are somewhat brief, but the functions themselves are
also simple enough to describe in such a way.
2023-05-10 17:47:58 +03:00
Evin Yulo
6d7bb255a4 Add std.fmt.parseIntSizeSuffix and use for --maxrss
Fixes #14955
2023-05-10 16:31:51 +03:00
Bogdan Romanyuk
c4dbfd5ae1 std.enums: make Ext parameter optional
According to #8169 optional generic functions work fine in comptime so it's possible
2023-05-10 16:15:41 +03:00
Veikka Tuominen
ae69fb87eb
Merge pull request #15508 from r00ster91/semathings
Sema: fixes to error messages
2023-05-10 16:12:46 +03:00
Ali Chraghi
05ceac52c9 std.Build: support #cmakedefine01 pattern 2023-05-10 16:10:03 +03:00
Travis Staloch
5d1e69389c std.enums: add tagName()
This is safe alternative to `@tagName()` for non-exhaustive enums that
doesn't panic when given an enum value that has no tag.
2023-05-10 16:07:34 +03:00
Brett Hill
37f56a4259 Issue 15535. Normalize remainder in math.big.int.Managed.divTrunc 2023-05-10 16:01:17 +03:00
Meghan
0972196f4d std.meta: remove tagName
not used by Zig itself anywhere
2023-05-10 16:00:14 +03:00
0x5a4
11fabc4cbe fix 'zig build test' crashing with no tests
fixes #15553
2023-05-10 00:43:45 -07:00
David CARLIER
5260657230 std.c: add freebsd's kinfo_vmobject 2023-05-10 01:48:35 +03:00
David CARLIER
10a7cf58c1 std.c: adding freebsd's domainset_t bitset 2023-05-10 01:13:15 +03:00
Pyry Kovanen
ffccd70671 tls: update finishRead2 for new @memcpy semantics 2023-05-09 14:47:04 -07:00
Andrew Kelley
e02a592437 Autodoc: update favicon to latest logo mark
ziglang/logo commit 6446ba8e37a0651da720d8869e1ce9264fa0c0b9
2023-05-09 14:24:21 -07:00
Loris Cro
8e9c9f6fdc
Merge pull request #15623 from der-teufel-programming/autodoc-backing-int
Autodoc: backing integer types for packed structs
2023-05-09 20:09:42 +02:00
David Carlier
e21739dd8c std.fs: selfExePath haiku using constants instead 2023-05-09 14:24:20 +03:00
David CARLIER
e8f76b452b std.c: adding freebsd's domainset api 2023-05-09 14:24:03 +03:00
David Carlier
1585ed637d std.c: openbsd sigcontext/ucontext for arm64. 2023-05-09 14:23:46 +03:00
David CARLIER
3dd0afe787 std.c: adding freebsd's kinfo_proc type. 2023-05-09 12:04:53 +03:00
r00ster91
297b5d1074 fix [x]u65529 and above overflowing
```
$ cat overflow.zig
test {
    var a: [1]u65535 = undefined;
    _ = a;
}
$ zig-out/bin/zig test overflow.zig
thread 290266 panic: integer overflow
zig/src/type.zig:3604:55: 0xada43d in intAbiAlignment (zig)
            std.math.ceilPowerOfTwoPromote(u16, (bits + 7) / 8),
                                                      ^
zig/src/type.zig:3598:42: 0xadd4ea in intAbiSize (zig)
        const alignment = intAbiAlignment(bits, target);
                                         ^
zig/src/type.zig:3500:61: 0x92be91 in abiSizeAdvanced (zig)
                return AbiSizeAdvanced{ .scalar = intAbiSize(bits, target) };
                                                            ^
zig/src/type.zig:3385:62: 0x928933 in abiSizeAdvanced (zig)
                switch (try payload.elem_type.abiSizeAdvanced(target, strat)) {
                                                             ^
zig/src/type.zig:3268:32: 0x92c012 in abiSize (zig)
        return (abiSizeAdvanced(ty, target, .eager) catch unreachable).scalar;
                               ^
```
This is only noticed in a debug build of zig and silently does the wrong
thing and overflows in release builds.

This happened to `[x]u65529` and above because of the ` + 7` on a `u16`.
2023-05-09 11:58:34 +03:00
Krzysztof Wolicki
a714f07022 autodoc: Fix tag type for unions; Fix backing int for packed structs 2023-05-09 10:52:51 +02:00
Krzysztof Wolicki
9c8b9719cb autodoc: Fix exprName for struct and union types 2023-05-09 10:51:19 +02:00
Krzysztof Wolicki
b488f97e92 autodoc: Analyze and expose backing integer types for packed structs 2023-05-08 22:34:46 +02:00
Krzysztof Wolicki
f2aa7c8698 autodoc: Remove rendering "tuple" as part of the name in exprName 2023-05-08 22:29:20 +02:00
Jakub Konka
f40539e5d8
Merge pull request #15597 from jacobly0/x86_64-behavior
x86_64: more behavior than ever before
2023-05-08 19:04:05 +02:00
jcalabro
16314e0e19 Fix langref typo 2023-05-08 19:41:28 +03:00
Jacob Young
1f5aa7747f x86_64: finish optimizing mir tag usage
Final tag count is 95.
2023-05-08 07:36:20 -04:00
Jacob Young
ecb5feaf94 x86_64: continue to optimize mir tag usage
Migrate mnemonic literals to tuples that represent the compressed
storage.  225 tags left in use, many tags left to compress.
2023-05-08 07:36:20 -04:00
Jacob Young
6c14eb2863 x86_64: optimize mir tag usage
This moves all pseudo-instructions to a single `Mir.Inst.Tag` tag and
prepares to start coalescing similar mnemonics. 239 tags left in use.
2023-05-08 07:36:20 -04:00
Jacob Young
6778da4516 x86_64: implement binary operations for f16 and f16 vectors 2023-05-08 07:36:20 -04:00
Jacob Young
f8708e2c4d x86_64: implement @floor, @ceil, and @trunc for float vectors 2023-05-08 07:36:20 -04:00
Jacob Young
057139fda5 x86_64: implement binary operations for float vectors 2023-05-08 07:36:20 -04:00
Jacob Young
ea957c4cff x86_64: implement @sqrt for f16 scalars and vectors 2023-05-08 07:36:20 -04:00
Jacob Young
5c5da179fb x86_64: implement @sqrt for vectors 2023-05-08 07:36:20 -04:00
Jacob Young
05580b9453 x86_64: implement float cast from f16 to f64 2023-05-08 07:36:20 -04:00
Jacob Young
1c53f0a6b0 Dwarf: workaround crash 2023-05-08 07:36:20 -04:00
Jacob Young
406c403543 x86_64: add missing movsx and movzx encodings 2023-05-08 07:36:20 -04:00
Jacob Young
cba195c117 x86_64: implement some float and float vector movement
This allows actually storing value of these supported types in
registers, and not restricting them to stack slots.
2023-05-08 07:36:20 -04:00