aboutsummaryrefslogtreecommitdiff
path: root/test/stage1
AgeCommit message (Collapse)Author
2022-07-26C ABI tests no longer apply to only stage1Andrew Kelley
2022-07-25wasm: Enable C-ABI tests for self-hosted compilerLuuk de Gram
2022-02-08C ABI: these tests are not passing yet on WindowsAndrew Kelley
I was too greedy
2022-02-08C ABI tests: give a clue in addition to "test failure"Andrew Kelley
2022-02-08c_abi tests: allow passing standard target optionsAndrew Kelley
2022-02-08stage1: fix x86 i128 C ABI for extern structsAndrew Kelley
closes #10445
2022-01-03stage1: Add tests for packed structs in C ABIpaulsnar
2021-12-19stage1, stage2: rename c_void to anyopaque (#10316)Isaac Freund
zig fmt now replaces c_void with anyopaque to make updating code easy.
2021-07-28stage1: Expand SysV C ABI support for small structsBelhorma Bendebiche
While the SysV ABI is not that complicated, LLVM does not allow us direct access to enforce it. By mimicking the IR generated by clang, we can trick LLVM into doing the right thing. This involves two main additions: 1. `AGG` ABI class This is not part of the spec, but since we have to track class per eightbyte and not per struct, the current enum is not enough. I considered adding multiple classes like: `INTEGER_INTEGER`, `INTEGER_SSE`, `SSE_INTEGER`. However, all of those cases would trigger the same code path so it's simpler to collapse into one. This class is only used on SysV. 2. LLVM C ABI type Clang uses different types in C ABI function signatures than the original structs passed in, and does conversion. For example, this struct: `{ i8, i8, float }` would use `{ i16, float }` at ABI boundaries. When passed as an argument, it is instead split into two arguments `i16` and `float`. Therefore, for every struct that passes ABI boundaries we need to keep track of its corresponding ABI type. Here are some more examples: ``` | Struct | ABI equivalent | | { i8, i8, i8, i8 } | i32 | | { float, float } | double | | { float, i32, i8 } | { float, i64 } | ``` Then, we must update function calls, returns, parameter lists and inits to properly convert back and forth as needed.
2021-06-10stage1: Fix handling of C ABI parameters split in multiple regsLemonBoy
Take into account the increased number of parameters when flattening a structure into one or more SSE registers. Fixes #9061
2021-05-08Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
2021-05-08tests: work around miscompilationVeikka Tuominen
2021-05-08update usage of std.testing in behavior and standalone testsVeikka Tuominen
2021-05-06Merge pull request #8683 from LemonBoy/thumblinuxAndrew Kelley
Initial bringup for Linux/Thumb2
2021-05-05tests: re-enable reduce behavior tests for wasm32Jakub Konka
2021-05-04std: Initial bringup for Linux on Thumb2LemonBoy
There are some small problems here and there, mostly due to the pointers having the lsb set and disrupting the fn alignment tests and the `@FrameSize` implementation.
2021-05-04stage1: Fix LLVM error in inline asm invocationLemonBoy
Pointer types need an extra indirection layer during the generation of the function prototype for inline asm blocks. Closes #3606
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
2021-04-29update behavior tests with respect to new builtin pkgAndrew Kelley
2021-04-29tests: prepare behavior tests for stage2Andrew Kelley
2021-04-25stage1: Change how the Frame alignment is computedLemonBoy
The code would previously assume every function would start at addresses being multiples of 16, this is not true beside some specific cases. Moreover LLVM picks different alignment values depending on whether it's trying to generate dense or fast code. Let's use the minimum guaranteed alignment as base value, computed according to how big the opcodes are. The alignment of function pointers is always 1, a safe value that won't cause any error at runtime. Note that this was already the case before this commit, here we're making this choice explicit. Let the 'alignment' field for TypeInfo of fn types reflect the ABI alignment used by the compiler, make this field behave similarly to the 'alignment' one for pointers.
2021-04-24stage1: Require a block after suspendLemonBoy
Closes #8603
2021-04-23stage1: Allow wrapping negation on unsigned ints at comptimeLemonBoy
Closes #7951 Closes #8574
2021-04-15test: Add test to ensure signed zeros are properly computedLemonBoy
Ensure everything's ok at comptime and runtime.
2021-04-14Merge remote-tracking branch 'origin/llvm12'Andrew Kelley
Happy LLVM 12 Release Day. Please note that the llvm 12 tag does not include the latest commit in the release/12.x branch, which is in fact a bug fix for a regression that is causing a failure in Zig's test suite. Zig master branch is tracking release/12.x, and will be enabling the test that is fixed by that commit.
2021-04-11std: Fix typo in sqrt implementationLemonBoy
The code initializes twice `t` instead of `t1`, leaving the latter uninitialized. The problem manifested itself by corrupting the LSBs of the result in unpredictable ways.
2021-04-11std: Make a test-case independent of the target endiannessLemonBoy
2021-04-02Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-04-02Merge pull request #8028 from mguaypaq/nosuspend-allowAndrew Kelley
stage1: allow async and resume inside nosuspend blocks
2021-03-28Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-03-14std: Replace testing fns for floating-point valuesLemonBoy
Beside handling NaNs and other non-numeric values better we finally offer the same pair of testing predicates in math and testing.
2021-03-13Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-03-12stage1: Add tests for C ABI integer return typesLemonBoy
2021-03-12re-enable behavior/vector test for aarch64Michael Dusan
- issue fixed in llvmorg-12.0.0-rc3 closes #8130
2021-03-07stage1: add tests for nosuspend async/resumeVeikka Tuominen
2021-03-04Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
Syncing with master branch because I want to re-run update_clang_options.zig in the llvm12 branch.
2021-03-02disable failing behavior tests with llvm 12Michael Dusan
- consolidate into single code block See #8130 See #8131
2021-03-02disable failing behavior tests with llvm 12Andrew Kelley
See #8130
2021-03-02re-enable behavior tests: translate-c macrosAndrew Kelley
These were temporarily disabled in dd973fb365dbbe11ce5beac8b4889bfab3fddc4d and we forgot re-enable them until now.
2021-02-10Convert inline fn to callconv(.Inline) everywhereTadeo Kondrak
2021-01-30Replace @TagType uses, mostly with std.meta.TagTadeo Kondrak
2021-01-11Merge pull request #7200 from Vexu/arrAndrew Kelley
Type coercion for pointers to anon literals
2021-01-07Reduce use of deprecated IO typesJay Petacat
Related: #4917
2021-01-04Merge pull request #7592 from LemonBoy/fix-7188Andrew Kelley
Allow variable captures on multi-prong switch arms
2021-01-02Fix more stray uses of {} for formatting stringsLemonBoy
2021-01-02std: Use {s} instead of {} when printing stringsLemonBoy
2020-12-30std: Clean up some testsLemonBoy
No functional changes, remove some dead code.
2020-12-30stage1: Allow variable capture for multi-prong switch armsLemonBoy
Handle the multi-prong case as we do with range cases. Closes #7188
2020-12-26stage1: const_values_equal error union, improve remaining "TODO" panicsVeikka Tuominen
2020-12-25fix testsVexu