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
This commit is contained in:
Robin Voetter 2023-05-19 11:28:25 +02:00
parent 37aa343079
commit 091595ac37
No known key found for this signature in database
GPG Key ID: E755662F227CB468

View File

@ -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