summaryrefslogtreecommitdiff
path: root/compiler_and_linker/unsorted/PCodeInfo.c
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-13 13:40:30 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-13 13:40:30 +0000
commit7a34d06bc7de5e71b83fbdda408664849d1a2274 (patch)
treecbe05db47405be67cee35e94e8a2d517fab7c136 /compiler_and_linker/unsorted/PCodeInfo.c
parent7a5280b96b1028617794af8ffbab8df4fbb1d6d5 (diff)
downloadMWCC-7a34d06bc7de5e71b83fbdda408664849d1a2274.tar.gz
MWCC-7a34d06bc7de5e71b83fbdda408664849d1a2274.zip
yet more fixes, some debugging code
Diffstat (limited to 'compiler_and_linker/unsorted/PCodeInfo.c')
-rw-r--r--compiler_and_linker/unsorted/PCodeInfo.c11
1 files changed, 7 insertions, 4 deletions
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':