Commit Graph

5361 Commits

Author SHA1 Message Date
Hardy
37fe41792c added test for bitcast signaled nan float
This was fixed by MR #14201

closes #10449
2023-01-20 16:42:24 +02:00
Veikka Tuominen
fe6dcdba14
Merge pull request #14357 from kcbanner/llvm_byval_struct
llvm: implement Stdcall calling convention
2023-01-20 04:38:49 +02:00
kcbanner
c1bdf01533 tests: disable c_abi tests for windows when compiling on linux 2023-01-19 13:06:21 -05:00
Veikka Tuominen
2b7678bc42 llvm: implement Stdcall return types 2023-01-19 16:13:52 +02:00
kcbanner
5949851074 llvm: pass non-scalars as byref in .Stdcall
- add c_abi tests for .Stdcall
- enable (x86|x86_64)-windows-gnu in the c_abi tests
2023-01-19 00:37:56 -05:00
Jakub Konka
9d4a4e9ed1 link-tests: update uuid test with new uuid given dyld ops changes 2023-01-19 00:05:54 +01:00
Veikka Tuominen
e04547642a Sema: promote smaller float types passed to variadic functions
Closes #6854
2023-01-17 20:28:43 +02:00
Veikka Tuominen
14f03fbd16 AstGen: reset source cursor before generating pointer attributes
These attributes can appear in any order but AstGen expects the source
cursor to be incremented in a monotonically increasing order.

Closes #14332
2023-01-17 20:28:43 +02:00
Veikka Tuominen
24646b8b5d windows x86_64 C ABI: pass byref structs as byref_mut 2023-01-17 20:28:43 +02:00
Veikka Tuominen
8b35f09f4a Sema: resolve lazy values in switch prong items
Closes #14330
2023-01-17 20:28:43 +02:00
Veikka Tuominen
6b037bad59 Sema: ignore dependency loops in typeinfo decls
This matches stage1 behavior.

Closes #14322
2023-01-17 20:28:43 +02:00
Veikka Tuominen
94be9dcc7f enable passing compile error test 2023-01-17 20:28:43 +02:00
Veikka Tuominen
6e067dc050 llvm: do not offset packed struct field pointers if they have a host size
Closes #14261
2023-01-17 20:28:42 +02:00
Veikka Tuominen
342bae02d8 Sema: automatically optimize order of struct fields
This is a simple starting version of the optimization described in #168
where the fields are just sorted by order of descending alignment.
2023-01-16 19:46:41 +02:00
Techatrix
32544ed56c
swap align and callconv in function typeName 2023-01-16 14:04:03 +02:00
Veikka Tuominen
bb15e4057c
Merge pull request #14271 from Vexu/c-abi
float related C ABI fixes
2023-01-14 21:42:29 +02:00
Veikka Tuominen
0013042cbd llvm: correctly handle C ABI structs with f32/f64 alignment differences
Closes #13830
2023-01-14 16:26:50 +02:00
Veikka Tuominen
5572c67e73 add C ABI tests for exotic float types 2023-01-14 16:26:50 +02:00
Veikka Tuominen
474848ac0b also run C ABI tests with -OReleaseFast 2023-01-14 16:26:50 +02:00
Veikka Tuominen
d8128c272a Sema: fix typeInfo decls with usingnamespace
Closes #12403
2023-01-11 21:11:21 +02:00
Veikka Tuominen
1658e4893d AstGen: add note pointing to tuple field
Closes #14188
2023-01-11 21:11:21 +02:00
Veikka Tuominen
8b1780d939 Sema: fix condition for omitting comptime arg from function type
Closes #14164
2023-01-11 21:11:21 +02:00
Veikka Tuominen
83673a8b5f fix errdefers in functions that can't return errors
This was broken by 58caed1c71

Closes #14053
2023-01-10 19:17:42 +02:00
Andrew Kelley
a01d2ab0e3
Merge pull request #14210 from Vexu/compile-errors
improve struct/union field error locations
2023-01-05 20:05:14 -07:00
Andrew Kelley
b3e495a38a
Merge pull request #14202 from ziglang/std.http
std.http.Client: support HTTP redirects
2023-01-05 19:42:59 -07:00
Jan Philipp Hafer
301a89849b tools: build all tools in ci to prevent bitrot
No LLVM assertions were triggered for me.
Closes #12015
Closes #12022
Closes #12223
2023-01-06 01:18:46 +02:00
Veikka Tuominen
f2faa303a5 Sema: handle enum expressions referencing local variables
Closes #12272
2023-01-05 22:03:32 +02:00
Veikka Tuominen
8c4727f9ab Sema: remove generic function from monomorphed_funcs on any error 2023-01-05 14:26:53 +02:00
Veikka Tuominen
3e084d8de3 Sema: only untyped undefined should coerce to all types
Closes #13958
2023-01-05 14:26:53 +02:00
Veikka Tuominen
352c71873b Sema: improve struct/union field error locations
Closes #14206
2023-01-05 13:11:36 +02:00
Veikka Tuominen
f83834993e std: collect all options under one namespace 2023-01-05 02:31:29 -07:00
Michael Dusan
e0fb4c29cb llvm codegen: fix f16,f32,f64 nan bitcasts
@bitCast from integer NaN representation to float NaN resulted in
changed bits in float. This only happened with signaled NaN.

- added test for signaled NaN
- added tests for quiet NaN (for completeness)

closes #14198
2023-01-05 02:22:30 -07:00
Andrew Kelley
ba1e53f116 avoid triggering LLVM bug on MIPS
See #13782
2023-01-05 00:03:59 -07:00
Michael Dusan
ed23615638 behavior: add test for #8277
Test `@sizeOf` reified union with zero-size payload fields.

closes #8277
2023-01-04 15:48:00 -05:00
joachimschmidt557
09122650ba stage2 AArch64: bump up alignment of stack items fitting in regs
This enables us to use more efficient loading and storing for these
small stack items
2023-01-03 19:56:09 +01:00
Veikka Tuominen
abd005f302 Sema: do not immediately destroy failed generic instantiation
Closes #12535
Closes #12765
Closes #12927
2023-01-03 18:38:15 +02:00
Luuk de Gram
7935135767
Merge pull request #14157 from Luukdegram/wasm-linker-misc
wasm-linker: various fixes & improvements
2023-01-03 15:47:16 +01:00
Luuk de Gram
b9224c172f
wasm-linker: Fix & mangle symbol name of imports
When outputting the names section, we should output the actual symbol
name rather than the import name. This makes sure that symbols with
an explicit name set have the correct name but retain the import name
too.

We also now correctly mangle the name of an extern function with an
explicit library name. This ensures that functions that have a
different library name, but the same import/function name, can be
resolved correctly with other modules and don't resolve to the
same symbol.
2023-01-03 10:02:54 +01:00
Andrew Kelley
9bcd48e40e Revert "make a .rsp file for zig clang"
This reverts commit 9db293492b.

It's not OK to call `realpath` in the compiler.

Reopens #12419
2023-01-02 16:31:45 -07:00
Andrew Kelley
df5fcf5432
Merge pull request #14159 from Vexu/err-fix
Sema: prevent spurious "depends on itself" errors
2023-01-02 17:37:27 -05:00
Andrew Kelley
0b99c83c21 fix behavior test compile error
I bungled the commit 995c36dcb1 during the
merge. Sorry about that.
2023-01-02 15:02:33 -07:00
Andrew Kelley
995c36dcb1 avoid testing inline for in unrelated behavior tests 2023-01-02 14:09:01 -07:00
kcbanner
4776128099 skip "atomicrmw with 128-bit ints" on everything except cbe 2023-01-02 13:56:32 -07:00
kcbanner
8ebf18635c skip "atomicrmw with 128-bit ints" on linux x64_64 due to linker error 2023-01-02 13:56:32 -07:00
kcbanner
50c31e5caa skip "truncate int128" on wasm 2023-01-02 13:56:32 -07:00
kcbanner
fc84b233ee skip "truncate to non-power-of-two integers from 128-bit" on non-llvm 2023-01-02 13:56:32 -07:00
kcbanner
c2f5c3bc4e skip "binary not 128-bit" on non-llvm 2023-01-02 13:56:32 -07:00
kcbanner
9c951cc874 fmt fixups 2023-01-02 13:56:32 -07:00
kcbanner
9c70315854 tests: add more coverage for 128 bit operations
- fixup 128-bit atomics test to only run on x86_64
- add truncation test for 128-bit types, including non power of two targets (there was a bug with broken non-power-of-two truncation in the cbe)
- add 128-bit binary not test (covers another bug fixed in the cbe)
2023-01-02 13:55:45 -07:00
Luuk de Gram
f9b3e8c762
test/link: add test case for exporting data syms 2023-01-02 18:36:18 +01:00