From a5dfd65eb4c88039013b479ec92d00179e399457 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 25 Jul 2021 15:04:03 +0100 Subject: [PATCH] DSPSpy: fix $prod printing --- Source/DSPSpy/main_spy.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/DSPSpy/main_spy.cpp b/Source/DSPSpy/main_spy.cpp index 746ebbe8b2..57cbb625a3 100644 --- a/Source/DSPSpy/main_spy.cpp +++ b/Source/DSPSpy/main_spy.cpp @@ -178,8 +178,10 @@ void print_reg_block(int x, int y, int sel, const u16* regs, const u16* compare_ u64 prod = (u64(regs[DSP_REG_PRODH]) << 32) + (u64(regs[DSP_REG_PRODM]) << 16) + (u64(regs[DSP_REG_PRODM2]) << 16) + u64(regs[DSP_REG_PRODL]); - CON_Printf(x + 2, y + 13, "PROD: %02x %04x %04x", (prod >> 32) & 0xff, (prod >> 16) & 0xffff, - prod & 0xffff); + u8 prod_h = (prod >> 32) & 0xff; + u16 prod_m = (prod >> 16) & 0xffff; + u16 prod_l = prod & 0xffff; + CON_Printf(x + 2, y + 13, "PROD: %02x %04x %04x", prod_h, prod_m, prod_l); CON_Printf(x + 2, y + 14, "SR:"); for (int i = 0; i < 16; ++i)