r00ster91
51d9db8569
fix(text): hyphenate "comptime" adjectives
2022-10-05 21:19:30 +02:00
Koakuma
0910cb6fcb
stage2: sparc64: Skip compile-failing tests for now
2022-09-14 16:58:12 -07:00
Andrew Kelley
2a96209c40
Merge pull request #12574 from Vexu/remove-bit-op-type-param
...
stage2+stage1: remove type parameter from bit builtins
2022-08-24 15:57:44 -04:00
Jakub Konka
abfe21a4fe
skip failing f80 behavior tests on Windows
2022-08-23 22:43:19 +02:00
Veikka Tuominen
62ff8871ed
stage2+stage1: remove type parameter from bit builtins
...
Closes #12529
Closes #12511
Closes #6835
2022-08-22 11:19:20 +03:00
zooster
4055e6055b
AstGen: disallow leading zeroes in int literals and int types
...
This makes `0123` and `u0123` etc. illegal.
I'm now confident that this is a good change because
I actually caught two C header translation mistakes in `haiku.zig` with this.
Clearly, `0123` being octal in C (TIL) can cause confusion, and we make this easier to read by
requiring `0o` as the prefix and now also disallowing leading zeroes in integers.
For consistency and because it looks weird, we disallow it for integer types too (e.g. `u0123`).
Fixes #11963
Fixes #12417
2022-08-18 19:54:51 +03:00
Isaac Freund
bb1c3e8b7e
stage2: Handle lazy values for the % operator
2022-08-10 14:48:27 +02:00
Veikka Tuominen
55fe34100f
Sema: exact division safety
2022-07-23 15:40:11 +03:00
Andrew Kelley
35e7011124
LLVM: implement signext/zeroext attributes
...
For calling convention ABI purposes, integer attributes and return
values need to have an LLVM attribute signext or zeroext added
sometimes. This commit implements that logic.
It also implements a proof-of-concept of moving the F16T type from
being a compiler_rt hack to being how the compiler lowers f16 in
functions that need to match certain calling conventions.
Closes #12054
2022-07-13 11:14:46 -07:00
Andrew Kelley
e0d5ae75af
these riscv64 behavior tests work for stage1 but not stage2
2022-07-09 12:48:59 -07:00
Andrew Kelley
f976758855
disable failing riscv64 tests from LLVM 14 upgrade
...
See #12054
2022-07-08 23:11:03 -07:00
Andrew Kelley
d8fc8d0118
compiler_rt: work around LLVM optimizing __muloti4 to call itself
...
This is a workaround for
https://github.com/llvm/llvm-project/issues/56403
2022-07-05 21:28:39 -07:00
Andrew Kelley
558ad19095
disable regressed behavior tests from llvm 14
...
See #12012
See #12013
2022-07-05 18:50:03 -07:00
Andrew Kelley
e8ce1728e9
disable regressed wasm32 behavior tests from LLVM 14
2022-07-05 15:46:12 -07:00
joachimschmidt557
960c142060
stage2 ARM: implement basic intCast and error union wrapping
2022-06-25 21:16:51 +02:00
Jakub Konka
6d32498c55
x64: re-enable behavior tests
2022-05-19 19:39:34 +02:00
Luuk de Gram
e252f92b99
wasm: enable 128bit integer behavior tests
2022-05-18 07:43:33 +02:00
Jakub Konka
852c820841
aarch64: sub_with_overflow should always track V flag
2022-05-16 13:55:26 -07:00
Jakub Konka
6608fa1353
Merge pull request #11628 from ziglang/x64-shifts
2022-05-11 08:24:03 +02:00
Andrew Kelley
b33c8b0b06
Sema: comptime float negation supports negative zero
...
When handling the `negate` ZIR instruction, Zig now checks for a
comptime operand and handles it as a special case rather than lowering
it as `0 - x` so that the expression `-x` where `x` is a floating point
value known at compile-time, will get the negative zero bitwise
representation.
2022-05-10 21:50:55 -07:00
Jakub Konka
3c69810fe6
x64: fix binary not implementation
2022-05-10 21:30:39 +02:00
Jakub Konka
f6f98a621f
x64: enable additional math test
2022-05-10 21:21:09 +02:00
Jakub Konka
1d3b714125
x64: implement shl with overflow for non-pow-2
2022-05-10 21:19:05 +02:00
Jakub Konka
d31875f7ab
x64: implement shl_with_overflow for powers of two
2022-05-10 20:53:44 +02:00
Jakub Konka
2a738599a0
x64: implement missing bits in add_with_overflow and sub_with_overflow
2022-05-10 20:45:57 +02:00
Jakub Konka
f131e41db9
x64: implement shl_exact and shr_exact
2022-05-10 19:34:20 +02:00
Jakub Konka
9c3d24ea0b
x64: add naive impl of shr
2022-05-09 17:39:19 +02:00
Luuk de Gram
a110979582
stage2: Split @mulWithOverflow tests
2022-05-07 20:02:02 +02:00
Jakub Konka
c592f0ca21
test: pass extended mul_with_overflow tests on x64
2022-05-05 22:53:11 +02:00
Jakub Konka
eab5a1bd5a
test: test bitwidths between 1...8 and 8...16 for mul_with_overflow
2022-05-05 21:43:36 +02:00
Jakub Konka
3cef23129a
test: test more int sizes for @mulWithOverflow builtin
2022-05-05 21:43:36 +02:00
Jakub Konka
8715b01005
aarch64: implement mul_with_overflow for <= 32bit ints
...
Add emitters for `smull`, `umull` and `tst (immediate)` instructions.
2022-05-05 21:43:36 +02:00
joachimschmidt557
aaacda4df9
stage2 AArch64: implement shl_with_overflow
2022-05-05 21:43:35 +02:00
joachimschmidt557
c2d2307d09
stage2 AArch64: initial implementation of {add,sub}_with_overflow
2022-05-05 21:43:35 +02:00
Marc Tiehuis
5fbda2c579
temporary fix for stage2/stage1 f128 rounding discrepency
...
This is only to get tests running again. The root issue should be fixed
in stage1 so rounding is consistent between stages.
2022-05-03 17:14:01 +12:00
Andrew Kelley
9d098657a0
stage1: fix i386-windows f80 sizeof/alignof
2022-04-27 22:57:12 -07:00
Andrew Kelley
7d8067878d
disable failing behavior test
...
This is a new test added in this branch but it is not yet passing for
i386-windows with the stage1 compiler.
2022-04-27 18:41:53 -07:00
Andrew Kelley
758ec9bdd4
enable newly passing behavior tests
...
closes #11030
2022-04-27 17:24:36 -07:00
Andrew Kelley
c4eaff6665
disable failing behavior tests
2022-04-27 14:29:59 -07:00
Andrew Kelley
41dd2beaac
compiler-rt: math functions reorg
...
* unify the logic for exporting math functions from compiler-rt,
with the appropriate suffixes and prefixes.
- add all missing f128 and f80 exports. Functions with missing
implementations call other functions and have TODO comments.
- also add f16 functions
* move math functions from freestanding libc to compiler-rt (#7265 )
* enable all the f128 and f80 code in the stage2 compiler and behavior
tests (#11161 ).
* update std lib to use builtins rather than `std.math`.
2022-04-27 12:20:44 -07:00
joachimschmidt557
fa85a739d9
stage2 AArch64: fix shl, shr, shl_exact, shr_exact
...
Introduces the necessary truncation after shift
2022-04-19 22:40:51 +02:00
joachimschmidt557
0a909a6712
stage2 AArch64: implement addwrap, subwrap, mulwrap
2022-04-19 22:40:50 +02:00
Cody Tapscott
1c1cfe1533
Skip @rem/@mod tests on stage2, due to missing fmodl implementation
2022-04-12 10:25:29 -07:00
Luuk de Gram
a0a587ff85
wasm: Enable passing behavior tests
...
This shuffles some tests do ensure the new instructions are tested for the wasm backend,
by moving vectors into their own tests as well as move the f16 test cases as those require
special operating also.
2022-04-02 21:54:01 +02:00
joachimschmidt557
c4778fc029
stage2 ARM: implement mul_with_overflow for ints <= 16 bits
2022-04-01 22:02:56 +02:00
joachimschmidt557
77e70189f4
stage2 ARM: implement shl_with_overflow for ints <= 32 bits
2022-04-01 22:02:56 +02:00
joachimschmidt557
37a8c28802
stage2 ARM: implement add/sub_with_overflow for ints < 32 bits
2022-04-01 22:02:56 +02:00
Jakub Konka
fd29ddc06c
x64: implement add/sub with wrapping and xor op
2022-04-01 11:37:18 +02:00
Meghan
b73cf97c93
replace other uses of std.meta.Vector with @Vector ( #11346 )
2022-03-30 14:12:14 -04:00
Jakub Konka
ee6e3aef5d
x64: redo @mulWithOverflow using rax/rdx based multiplication
2022-03-30 00:37:42 +02:00