From c2e22fb7425ed86aeaa0817d7183385e5b0d7a3d Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 18 May 2026 23:00:43 +0200 Subject: [PATCH] better logs --- core/broadway/instructions.cpp | 8 ++++---- external/ircolib/types.hpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/broadway/instructions.cpp b/core/broadway/instructions.cpp index 1f7feda..c1a9270 100644 --- a/core/broadway/instructions.cpp +++ b/core/broadway/instructions.cpp @@ -147,7 +147,7 @@ void broadway::stwu(ircolib::u32 instr, mem &mem) { auto _ = mem.write32(EA, gpr[utils::RS(instr)]) .and_then([&] { return std::expected(); }) .or_else([&](std::string e) { - ircolib::panic("broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); + ircolib::panic("stwu broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); return std::expected(); }); gpr[utils::RA(instr)] = EA; @@ -161,7 +161,7 @@ void broadway::stbu(ircolib::u32 instr, mem &mem) { auto _ = mem.write8(EA, gpr[utils::RS(instr)]) .and_then([&] { return std::expected(); }) .or_else([&](std::string e) { - ircolib::panic("broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); + ircolib::panic("stbu broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); return std::expected(); }); gpr[utils::RA(instr)] = EA; @@ -176,7 +176,7 @@ void broadway::stw(ircolib::u32 instr, mem &mem) { auto _ = mem.write32(EA, gpr[utils::RS(instr)]) .and_then([&] { return std::expected(); }) .or_else([&](std::string e) { - ircolib::panic("broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); + ircolib::panic("stw broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); return std::expected(); }); } @@ -192,7 +192,7 @@ void broadway::sth(ircolib::u32 instr, mem &mem) { auto _ = mem.write16(EA, ircolib::u16(gpr[utils::RS(instr)])) .and_then([&] { return std::expected(); }) .or_else([&](std::string e) { - ircolib::panic("broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); + ircolib::panic("sth broadway write failed. Reason: {} (pc: 0x{:08X})", e, pc - 4); return std::expected(); }); } diff --git a/external/ircolib/types.hpp b/external/ircolib/types.hpp index b03443d..396a74c 100644 --- a/external/ircolib/types.hpp +++ b/external/ircolib/types.hpp @@ -11,23 +11,23 @@ using s16 = int16_t; using s32 = int32_t; using s64 = int64_t; -template +template static constexpr bool is_bit_set(const T &val) { return val & (1 << bit); } -template +template static constexpr void set_bit(T &val) { val |= 1 << bit; } template -inline bool is_bit_set(const T &val, const size_t &bit) { +inline bool is_bit_set(const T &val, const std::size_t &bit) { return val & (1 << bit); } template -inline void set_bit(T &val, const size_t &bit) { +inline void set_bit(T &val, const std::size_t &bit) { val |= 1 << bit; } } // namespace ircolib