From 446eeba0943b27be132548848b2dce8b54b0ba55 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:11:44 -0300 Subject: [PATCH] chore: run zig fmt --- src/cpu.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu.zig b/src/cpu.zig index 452d602..4c37c1a 100644 --- a/src/cpu.zig +++ b/src/cpu.zig @@ -131,7 +131,7 @@ const CPSR = struct { pub fn set_v(self: *@This(), set: bool) void { self.set_bit(28, set); } - + pub fn i(self: *const @This()) bool { return self.inner >> 7 & 0x01 == 0x01; } @@ -159,15 +159,15 @@ const CPSR = struct { pub fn mode(self: *const @This()) Mode { return self.inner & 0x1F; } - + pub fn set_mode(_: *@This(), _: Mode) void { std.debug.panic("TODO: Implement set_mode for CPSR", .{}); } - + fn set_bit(self: *@This(), comptime bit: usize, set: bool) void { const set_val = @as(u32, @boolToInt(set)) << bit; const mask = ~(@as(u32, 1) << bit); - + self.inner = (self.inner & mask) | set_val; } };