From f52299cf837951cbc1dc92fd0d084444ac3dc712 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 4 Oct 2023 03:46:29 -0600 Subject: demo: implement cache debug --- demo/console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'demo/console.c') diff --git a/demo/console.c b/demo/console.c index b35ace7..d2d13fa 100644 --- a/demo/console.c +++ b/demo/console.c @@ -48,7 +48,8 @@ static void print_hex(unsigned val, unsigned bits) if (bits > 32) bits = 32; - bits = bits & ~3; + bits = (bits + 3) & ~3; + do print_char(hex_digits[(val >> (bits -= 4)) & 0xf]); while (bits); -- cgit v1.2.3