aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/math.zig
AgeCommit message (Collapse)Author
2024-06-13riscv: implement more arithmetic instructionsDavid Rubin
2024-06-13riscv: zero registers when using register-wide operationsDavid Rubin
what was happening is that instructions like `lb` were only affecting the lower bytes of the register and leaving the top dirty. this would lead to situtations were `cmp_eq` for example was using `xor`, which was failing because of the left-over stuff in the top of the register. with this commit, we now zero out or truncate depending on the context, to ensure instructions like xor will provide proper results.
2024-06-13riscv: `std.fmt.format` runningDavid Rubin
- implements `airSlice`, `airBitAnd`, `airBitOr`, `airShr`. - got a basic design going for the `airErrorName` but for some reason it simply returns empty bytes. will investigate further. - only generating `.got.zig` entries when not compiling an object or shared library - reduced the total amount of ops a mnemonic can have to 3, simplifying the logic
2024-06-10spirv: new vectorization helperRobin Voetter
The old vectorization helper (WipElementWise) was clunky and a bit annoying to use, and it wasn't really flexible enough. This introduces a new vectorization helper, which uses Temporary and Operation types to deduce a Vectorization to perform the operation in a reasonably efficient manner. It removes the outer loop required by WipElementWise so that implementations of AIR instructions are cleaner. This helps with sanity when we start to introduce support for composite integers. airShift, convertToDirect, convertToIndirect, and normalize are initially implemented using this new method.
2024-06-10spirv: disable tests that fail on poclRobin Voetter
Besides the Intel OpenCL CPU runtime, we can now run the behavior tests using the Portable Computing Language. This implementation is open-source, so it will be easier for us to patch in updated versions of spirv-llvm-translator that have bug fixes etc.
2024-05-11riscv: add stage2_riscv to test matrix and bypass failing testsDavid Rubin
2024-04-06spirv: enable passing testsRobin Voetter
2024-04-06spirv: implement `@mulWithOverflow`Ali Chraghi
2024-03-30spirv: clz, ctz for openclRobin Voetter
This instruction seems common in compiler_rt.
2024-02-15test: skip new failing tests for spirvAli Chraghi
2024-02-12x86_64: implement mul, div, and mod of large integersJacob Young
This enables the last compiler-rt test disabled for the x86_64 backend.
2024-02-06x86_64+macho: pass more behavior testsJakub Konka
2024-02-04spirv: update testsRobin Voetter
2024-02-04spirv: air absRobin Voetter
2024-02-04spirv: shlWithOverflowRobin Voetter
2024-02-04spirv: element-wise operation helperRobin Voetter
2024-02-04spirv: sh[rl](_exact)?Robin Voetter
2024-01-15test/behavior: replace all 'comptime expect' with 'comptime assert'dweiller
2024-01-06categorize `behavior/bugs/<issueno>.zig` testsVeikka Tuominen
2024-01-04`@shlExact` fixupsAndrew Kelley
* Add clarification in langref * move test case to behavior tests
2023-12-04x86_64: fix vector comparisionsJacob Young
2023-11-19test: update behavior to silence 'var is never mutated' errorsmlugg
2023-10-25x86_64: pass more testsJacob Young
* 128-bit integer multiplication with overflow * more instruction encodings used by std inline asm * implement the `try_ptr` air instruction * follow correct stack frame abi * enable full panic handler * enable stack traces
2023-10-23x86_64: implement `@mod` for floating-point typesJacob Young
2023-10-15wasm: disable division testRobin Voetter
Seems that bit integers are not properly supported
2023-10-15spirv: update failing / passing testsRobin Voetter
Some tests are now failing due to debug info changes, some tests now pass due to improved compiler functionality.
2023-10-15spirv: sign-extension for strange integersRobin Voetter
2023-10-14tests: enable already passing behaviour tests for self-hosted wasmXavier Bouchoux
1611 passed; 262 skipped; 0 failed. (was: 1543 passed; 330 skipped; 0 failed.)
2023-10-08x86_64: implement `@rem` for floatsJacob Young
2023-10-08x86_64: fix `@divTrunc` and `@divFloor` of `f16`Jacob Young
2023-10-07x86_64: implement `f80` movementJacob Young
2023-10-05x86_64: implement C abi for everything elseJacob Young
2023-10-05x86_64: implement C abi for f128Jacob Young
2023-10-01x86_64: implement float arithmetic builtinsJacob Young
2023-10-01x86_64: implement float round builtinsJacob Young
2023-10-01x86_64: implement and test unary float builtinsJacob Young
2023-09-27Replace `@fabs` with `@abs` in behavior testsantlilja
2023-09-23spirv: enable passing testsRobin Voetter
2023-09-23spirv: air sub_with_overflowRobin Voetter
2023-09-23spirv: disable failing testsRobin Voetter
2023-09-19compiler_rt: fix fp sub being optimized to call itselfJacob Young
Closes #16844 Reduces #16846
2023-09-19disable behavior tests regressed by LLVM 17Andrew Kelley
See #16844 See #16845 See #16846 See #16848
2023-09-10wasm: enable successful behavior testsTechatrix
2023-07-31std: finish cleanup up asmJacob Young
This also required implementing the necessary syntax in the x86_64 backend.
2023-07-31cbe: get behavior tests running on armJacob Young
Specifically without linking libc.
2023-07-12Update tests to new splat syntaxantlilja
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-13all: replace `comptime try` with `try comptime`Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-05-20Merge pull request #15753 from Snektron/spirv-more-testsAndrew Kelley
spirv: make more tests pass
2023-05-20spirv: dont use OpIAddCarryRobin Voetter
This instruction is not really working well in the LLVM SPIRV translator, as it is not implemented. This commit also intruces the constructStruct helper function to initialize structs at runtime. This is ALSO buggy in the translator, and we must work around OpCompositeConstruct not working when some of the constituents are runtime-known only. Some other improvements are made: - improved variable() so that it is more useful and no longer requires the address space. It always puts values in the Function address space, and returns a pointer to the Generic address space - adds a boolToInt utility function