Commit 091595ac37

Robin Voetter <robin@voetter.nl>
2023-05-19 11:28:25
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
1 parent 37aa343
Changed files (1)
test
behavior
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