From 091595ac3711fcbc372ffe6d002890f9dd897598 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Fri, 19 May 2023 11:28:25 +0200 Subject: [PATCH] spirv: customize module-scope asm test This test passes just fine, but the provided assembly is not valid for spir-v. This adds a custom assembly test and enables the test for spir-v --- test/behavior/asm.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/behavior/asm.zig b/test/behavior/asm.zig index 5c446e5f85..e365936798 100644 --- a/test/behavior/asm.zig +++ b/test/behavior/asm.zig @@ -15,6 +15,10 @@ comptime { \\.type this_is_my_alias, @function; \\.set this_is_my_alias, derp; ); + } else if (builtin.zig_backend == .stage2_spirv64) { + asm ( + \\%a = OpString "hello there" + ); } } @@ -24,7 +28,6 @@ test "module level assembly" { if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_c and builtin.os.tag == .windows) return error.SkipZigTest; // MSVC doesn't support inline assembly