diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-03-11 00:04:42 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-11 00:04:42 -0700 |
| commit | 078037ab9b410fa13a86eabdfc30918fc83cdcf3 (patch) | |
| tree | b5e80992e82d015393872fcc57911b03ca7211fd /test/behavior/basic.zig | |
| parent | b28b3f6f7b1dd4c3c8a0f3d3a6305a84daed8ead (diff) | |
| download | zig-078037ab9b410fa13a86eabdfc30918fc83cdcf3.tar.gz zig-078037ab9b410fa13a86eabdfc30918fc83cdcf3.zip | |
stage2: passing threadlocal tests for x86_64-linux
* use the real start code for LLVM backend with x86_64-linux
- there is still a check for zig_backend after initializing the TLS
area to skip some stuff.
* introduce new AIR instructions and implement them for the LLVM
backend. They are the same as `call` except with a modifier.
- call_always_tail
- call_never_tail
- call_never_inline
* LLVM backend calls hasRuntimeBitsIgnoringComptime in more places to
avoid unnecessarily depending on comptimeOnly being resolved for some
types.
* LLVM backend: remove duplicate code for setting linkage and value
name. The canonical place for this is in `updateDeclExports`.
* LLVM backend: do some assembly template massaging to make `%%`
rendered as `%`. More hacks will be needed to make inline assembly
catch up with stage1.
Diffstat (limited to 'test/behavior/basic.zig')
| -rw-r--r-- | test/behavior/basic.zig | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index f925ddede3..f22e93008c 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -720,6 +720,11 @@ test "string concatenation" { test "thread local variable" { if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch != .x86_64) return error.SkipZigTest; // TODO const S = struct { threadlocal var t: i32 = 1234; @@ -746,11 +751,12 @@ fn maybe(x: bool) anyerror!?u32 { } test "pointer to thread local array" { - if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch != .x86_64) return error.SkipZigTest; // TODO const s = "Hello world"; std.mem.copy(u8, buffer[0..], s); |
