authorgravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-08-21 07:20:25-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-22 12:45:29-07:00
logf2796239baf1b5883e007729e6064e144c443b56
tree15d0c6a2f4adc5868a5eaa2d6a90854e5bd829b5
parent3a9af0c88be324dd049d85da0600230a03404946

SPU-II: Fix logging in interp, remove JIT-compat code


1 files changed, 2 insertions(+), 5 deletions(-)

lib/std/spu/interpreter.zig+2-5
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("std");1const std = @import("std");
2const log = std.log.scoped(.SPU_2_Interpreter);
2usingnamespace @import("defines.zig");3usingnamespace @import("defines.zig");
34
4pub fn Interpreter(comptime Bus: type) type {5pub fn Interpreter(comptime Bus: type) type {
...@@ -18,7 +19,7 @@ pub fn Interpreter(comptime Bus: type) type {...@@ -18,7 +19,7 @@ pub fn Interpreter(comptime Bus: type) type {
18 count += 1;19 count += 1;
19 var instruction = @bitCast(Instruction, self.bus.read16(self.ip));20 var instruction = @bitCast(Instruction, self.bus.read16(self.ip));
2021
21 std.log.debug(.SPU_2_Interpreter, "Executing {}\n", .{instruction});22 log.debug("Executing {}\n", .{instruction});
2223
23 self.ip +%= 2;24 self.ip +%= 2;
2425
...@@ -137,10 +138,6 @@ pub fn Interpreter(comptime Bus: type) type {...@@ -137,10 +138,6 @@ pub fn Interpreter(comptime Bus: type) type {
137 },138 },
138 .jump => {139 .jump => {
139 self.ip = output;140 self.ip = output;
140 if (!(instruction.command == .copy and instruction.input0 == .immediate)) {
141 // Not absolute. Break, for compatibility with JIT.
142 break;
143 }
144 },141 },
145 else => return error.unimplemented,142 else => return error.unimplemented,
146 }143 }