From 7a34d06bc7de5e71b83fbdda408664849d1a2274 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Fri, 13 Jan 2023 13:40:30 +0000 Subject: yet more fixes, some debugging code --- compiler_and_linker/unsorted/PCodeInfo.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'compiler_and_linker/unsorted/PCodeInfo.c') diff --git a/compiler_and_linker/unsorted/PCodeInfo.c b/compiler_and_linker/unsorted/PCodeInfo.c index fdfa71e..fdd19a2 100644 --- a/compiler_and_linker/unsorted/PCodeInfo.c +++ b/compiler_and_linker/unsorted/PCodeInfo.c @@ -284,6 +284,7 @@ PCode *vformatpcode(short opcode, va_list argList) { format += pcode_const_from_format(format + 1, &thing); else CError_FATAL(319); + case 's': tmp = va_arg(argList, int); tmp2 = -1; for (i = 0; i < 4; i++) { @@ -879,8 +880,8 @@ void formatoperands(PCode *pcode, char *buf, int showBasicBlocks) { buf += sprintf(buf, "!!!r"); } buf += sprintf(buf, "0"); + break; } - break; case 'r': buf += expectandformatoperand(pa, PCOp_REGISTER, RegClass_GPR, -1, buf); break; @@ -956,7 +957,7 @@ void formatoperands(PCode *pcode, char *buf, int showBasicBlocks) { break; case 'Q': - buf += expectandformatoperand(pa, PCOp_REGISTER, RegClass_SPR, -1, buf); + buf += expectandformatoperand(pa, PCOp_REGISTER, RegClass_CRFIELD, -1, buf); *(buf++) = ','; pa++; arg_index++; @@ -999,9 +1000,11 @@ void formatoperands(PCode *pcode, char *buf, int showBasicBlocks) { case 't': if (pa->kind == PCOp_IMMEDIATE && pa->data.imm.value > 0 && pa->data.imm.value < 31 && (name = to[pa->data.imm.value])[0]) { buf += sprintf(buf, "%s", name); - } else { - buf += expectandformatoperand(pa, PCOp_IMMEDIATE, 'x', 5, buf); + break; } + + case 'B': + buf += expectandformatoperand(pa, PCOp_IMMEDIATE, 'x', 5, buf); break; case 'l': -- cgit v1.2.3