adding msb, lsb and spec constants
Build / build (push) Successful in 2m3s
Test / build (push) Successful in 8m40s

This commit is contained in:
2026-03-30 01:00:00 +02:00
parent fbaf85a849
commit 6c8b364c7d
6 changed files with 431 additions and 243 deletions
+7 -1
View File
@@ -189,7 +189,13 @@ fn checkEndiannessFromSpvMagic(magic: SpvWord) bool {
fn pass(self: *Self, allocator: std.mem.Allocator) ModuleError!void {
var rt = Runtime.init(allocator, self) catch return ModuleError.OutOfMemory;
defer rt.deinit(allocator);
defer {
for (self.results, rt.results) |*result, new_result| {
result.deinit(allocator);
result.* = new_result.dupe(allocator) catch unreachable; // OutOfMemory if unreachable
}
rt.deinit(allocator);
}
while (rt.it.nextOrNull()) |opcode_data| {
const word_count = ((opcode_data & (~spv.SpvOpCodeMask)) >> spv.SpvWordCountShift) - 1;