Commit Graph

6117 Commits (12b195f9d507bfc0aa4d0199972ae32d096ef1ad)

Author SHA1 Message Date
Andrew Kelley 12b195f9d5
ci: update windows image to MSVC 2019 2019-09-22 15:32:52 -04:00
Andrew Kelley cf4cc9b148
do the release tests last because they take longer 2019-09-22 14:41:47 -04:00
Andrew Kelley 786052c7d3 disable running cross compiled macos tests
due to #3295
2019-09-22 14:40:54 -04:00
Andrew Kelley 9627a75b07 clean up compiler_rt with some enum literals 2019-09-22 14:00:05 -04:00
Andrew Kelley 2510edeb71
fix linux stat struct on aarch64
The ABI was incorrect.
2019-09-22 11:22:22 -04:00
Andrew Kelley dc2463d9a9
windows ci: make the case of file names agree 2019-09-22 11:22:22 -04:00
Andrew Kelley ffef5d26b6
significantly increase test coverage
* add zig build option `-Dskip-libc` to skip tests that build libc
   (e.g. if you don't want to wait for musl to build)
 * add `-Denable-wine` option which uses wine to run cross compiled
   windows tests on non-windows hosts
 * add `-Denable-qemu` option which uses qemu to run cross compiled
   foreign architecture tests
 * add `-Denable-foreign-glibc=path` option which combined with
   `-Denable-qemu` enables running cross compiled tests that link
   against glibc. See
   https://github.com/ziglang/zig/wiki/Updating-libc#glibc for how to
   produce this directory.
 * the test matrix is done manually. release test builds are only
   enabled by default for the native target. this should save us some CI
   time, while still providing decent coverage of release builds.
   - add test coverage for `x86_64-linux-musl -lc` (building musl libc)
   - add test coverage for `x86_64-linux-gnu -lc` (building glibc)
   - add test coverage for `aarch64v8_5a-linux-none`
   - add test coverage for `aarch64v8_5a-linux-musl -lc` (building musl libc)
   - add test coverage for `aarch64v8_5a-linux-gnu -lc` (building glibc)
   - add test coverage for `arm-linux-none`
   - test coverage for `arm-linux-musleabihf -lc` (building musl libc) is
     disabled due to #3286
   - test coverage for `arm-linux-gnueabihf -lc` (building glibc) is disabled
     due to #3287
   - test coverage for `x86_64-windows-gnu -lc` (building mingw-w64) is
     disabled due to #3285
 * enable qemu testing on the Linux CI job. There's not really a good
   reason to enable wine, since we have a Windows CI job as well.
 * remove the no longer needed `--build-file ../build.zig` from CI
   scripts
 * fix bug in glibc compilation where it wasn't properly reading the abi
   list txt files, resulting in "key not found" error.
 * std.build.Target gains:
   - isNetBSD
   - isLinux
   - osRequiresLibC
   - getArchPtrBitWidth
   - getExternalExecutor
 * zig build system gains support for enabling wine and enabling qemu.
   `artifact.enable_wine = true;`, `artifact.enable_qemu = true;`. This
   communicates that the system has these tools installed and the build
   system will use them to run tests.
 * zig build system gains support for overriding the dynamic linker of
   an executable artifact.
 * fix std.c.lseek prototype. makes behavior tests for
   arm-linux-musleabihf pass.
 * disable std lib tests that are failing on ARM. See #3288, #3289
 * provide `std.os.off_t`.
 * disable some of the compiler_rt symbols for arm 32 bit. Fixes
   compiler_rt tests for arm 32 bit
 * add __stack_chk_guard when linking against glibc. Fixes std lib tests
   for aarch64-linux-gnu
 * workaround for "unable to inline function" using `@inlineCall`. Fixes
   compiler_rt tests for arm 32 bit.
2019-09-22 11:22:17 -04:00
Michael Dusan c5716715d5 stage1: fix lost argv[0]
- bug presented on FreeBSD when `/proc` filesystem is not mounted
- bogus `cc` was used as exename, causing incorrect executable spawn
- llvm::sys::fs::getMainExecutable() has platform-specific code
  to get exename and fallback is to use param argv0
- linux fallback is rare because `/proc` is usually mounted
- *BSD fallback is not rare because `/proc` is often not mounted
- macOS doesn't ever fallback: bug cannot present
- windows doesn't ever fallback: bug cannot present
- other Posix will always present
2019-09-22 11:21:22 -04:00
LemonBoy a11c20e26a Fix TLS for VariantI arches with a twist 2019-09-21 19:53:39 -04:00
Andrew Kelley 4dd17a7c9e
zig test: don't skip execution when explicit command provided 2019-09-21 15:57:09 -04:00
Andrew Kelley 2c681d7ba1
add behavior test for float widening f16 to f128
it's disabled on aarch64, see #3282
2019-09-21 14:22:23 -04:00
Andrew Kelley f3a7c346dd
Merge pull request #3278 from LemonBoy/struct-gen
A few steps towards AArch64 & ARM passing the behavior tests
2019-09-21 13:46:13 -04:00
Andrew Kelley 533aff3a6a
Merge pull request #3238 from Tetralux/fixed-allocator-reset
FixedBufferAllocator.reset
2019-09-21 12:48:45 -04:00
Tetralux 86b6790b6a
Remove 'inline', as per @andrewrk 2019-09-21 15:42:26 +00:00
LemonBoy 34d02f249b Fix a test on ARM due to the use of `undefined` ptr 2019-09-21 11:39:50 +02:00
LemonBoy 57f751a864 Adjust tests for AArch64 2019-09-21 11:39:50 +02:00
LemonBoy 093ffe9f16 Correct stack alignment for new stack 2019-09-21 11:39:50 +02:00
LemonBoy 75ec7e4e00 Fix generation of tail fields for packed struct 2019-09-21 11:39:43 +02:00
Andrew Kelley 3377044ebe
Merge pull request #3183 from LemonBoy/fix-3128
Don't forget to resolve the pointee type
2019-09-20 18:01:42 -04:00
Andrew Kelley 257fded70c
avoid setting `tail` for `@panic`
Currently, slices are passed via reference, even though it would be
better to pass the ptr and len as separate arguments (#561). This means
that any function call with a slice parameter cannot be a tail call,
because according to LLVM spec:

> Both [tail,musttail] markers imply that the callee does not access
> allocas from the caller

There was one other place we were setting `tail` and I made that
conditional on whether or not the argument referenced allocas in the
caller.

This was causing undefined behavior in the compiler when it hit asserts,
causing it to print garbage memory to the terminal. See #3262 for
example.
2019-09-20 17:48:24 -04:00
Andrew Kelley f663bcd6b2
add more RISCV64 linux bits to std lib 2019-09-20 15:24:50 -04:00
Andrew Kelley ea776c287b
Merge branch 'daurnimator-linux-5.3'
closes #3266
2019-09-20 15:10:25 -04:00
Andrew Kelley aab1ec5c43
fix typo 2019-09-20 15:02:47 -04:00
daurnimator 2a8facafde
std: update for linux 5.3 2019-09-20 15:01:47 -04:00
daurnimator edea0d431b
std: update riscv64 syscalls 2019-09-20 15:01:47 -04:00
Sahnvour 74d0b5bf7c reject types of automatic container layout in packed unions 2019-09-20 13:25:32 -04:00
Andrew Kelley c9a5a6b83a
add test case for already fixed bug
closes #3046
2019-09-20 13:19:29 -04:00
Timon Kruiper 3b4a6679a6 Fix comptime bitcast inside an expression 2019-09-20 13:13:26 -04:00
Andrew Kelley 695695c852
update README
Also I verified that muldi3 has not changed since the previous ported
reference commit.
2019-09-20 12:58:00 -04:00
Andrew Kelley ee200aaa8c
fix typo in docs
closes #3267
2019-09-20 11:48:35 -04:00
Michael Dusan d60f9d0d4b stage1: fix gcc 9.1.0 compiler error on archlinux 2019-09-19 23:30:48 -04:00
Andrew Kelley e81156b873
Merge pull request #3260 from ziglang/llvm9
LLVM 9
2019-09-19 21:12:57 -04:00
Andrew Kelley b76d16c7c7
update remaining llvm 8.0.0 references to 9.0.0 2019-09-19 20:55:02 -04:00
Andrew Kelley 14d2e16b60
macos ci: RISCV is no longer experimental 2019-09-19 18:32:40 -04:00
Andrew Kelley 00cd988438
update CI scripts llvm 8 to 9 2019-09-19 17:04:27 -04:00
Andrew Kelley 8a30edcde8
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-19 17:02:32 -04:00
stratact 925ffbce7f Disable Channel, Future, and Lock tests for FreeBSD (#3253)
* Disable Channel, Future, and Lock tests for FreeBSD
2019-09-19 13:45:54 -04:00
Andrew Kelley ef3f7ecc19
update std.zig.tokenizer 2019-09-19 13:07:30 -04:00
Andrew Kelley cd3068b4eb
Merge pull request #3017 from fengb/tokenize-cleaner-errors
Update stage2 parser errors to match compiler friendliness
2019-09-19 12:36:07 -04:00
daurnimator 3b297f58f7 src: use zig_panic rather than having LLVM abort 2019-09-19 11:51:39 -04:00
Shawn Landden ff9f3275de docs: clarify @clz and @ctz terminology to not be endian-specific.
This was brought up in IRC a few days ago.
2019-09-19 11:47:02 -04:00
Shawn Landden c9937f4a2b Allow Zig programs to implement their own startup (_start) for ELF executables.
/home/shawn/git/zig-simd/build/lib/zig/std/special/start.zig:23:40: error: exported symbol collision: '_start'
        @export("_start", _start, .Strong);
        ^
/home/shawn/git/zig-simd/build/d.zig:1:1: note: other symbol is here
pub export fn _start() void {
^
/home/shawn/git/zig-simd/build/lib/zig/std/special/start.zig:124:35: error: root source file has no member called 'main'
    switch (@typeInfo(@typeOf(root.main).ReturnType)) {
2019-09-19 11:43:00 -04:00
ScorrMorr 7ebb7ca580 pass param as ref in ZigList::append 2019-09-19 11:41:18 -04:00
Andrew Kelley 1eb33966b1
Merge branch 'merge-shawnl-simd5'
This is the commit from Shawn's SIMD patchset regarding `@splat`,
plus my fixups.
2019-09-19 11:15:07 -04:00
Andrew Kelley 28c7fe60b6
add docs for `@splat` 2019-09-19 11:14:42 -04:00
Andrew Kelley 005a54a853
fixups for `@splat`
* Fix codegen for splat - instead of giving vectors of length N
   to shufflevector for both of the operands, it gives vectors of length
   1. The mask vector is the only one that needs N elements.
 * Separate Splat into SplatSrc and SplatGen; the `len` is not needed
   once it gets to codegen since it is redundant with the result type.
 * Refactor compile error for wrong vector element type so that the
   compile error message is not duplicated in zig source code
 * Improve implementation to correctly handle comptime values such as
   undefined and lazy values.
 * Improve compile error for bad vector element type to point to the
   correct place.
 * Delete dead code.
 * Modify behavior test to use an array cast instead of vector element
   indexing since I'm merging this splat commit out-of-order from
   Shawn's patch set.
2019-09-19 10:58:12 -04:00
Shawn Landden 01577a3af4
`@splat` 2019-09-19 10:11:06 -04:00
Andrew Kelley 0048bcbd71
Merge branch 'merge-shawnl-simd5'
This is the commit from Shawn's SIMD patchset regarding `@byteSwap`,
plus my fixups.
2019-09-19 01:05:12 -04:00
Andrew Kelley 380c8ec2c9
implement runtime `@byteSwap` and other fixups
* update docs for `@byteSwap`.
 * fix hash & eql functions for ZigLLVMFnIdBswap not updated to
   include vector len. this was causing incorrect bswap function
   being called in unrelated code
 * fix `@byteSwap` behavior tests only testing comptime and not
   runtime operations
 * implement runtime `@byteSwap`
 * fix incorrect logic in ir_render_vector_to_array and
   ir_render_array_to_vector with regards to whether or not to bitcast
 * `@byteSwap` accepts an array operand which it will cast to vector
 * simplify `@byteSwap` semantic analysis code and various fixes
2019-09-19 00:59:04 -04:00
Shawn Landden 76f5396077
@byteSwap on vectors 2019-09-18 16:49:14 -04:00