notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gpu_neon: revive the old tests
[pcsx_rearmed.git]
/
deps
/
lightrec
/
disassembler.c
diff --git
a/deps/lightrec/disassembler.c
b/deps/lightrec/disassembler.c
index
8bfaf4d
..
f0aef60
100644
(file)
--- a/
deps/lightrec/disassembler.c
+++ b/
deps/lightrec/disassembler.c
@@
-40,6
+40,10
@@
static const char * const std_opcodes[] = {
[OP_SWR] = "swr ",
[OP_LWC2] = "lwc2 ",
[OP_SWC2] = "swc2 ",
[OP_SWR] = "swr ",
[OP_LWC2] = "lwc2 ",
[OP_SWC2] = "swc2 ",
+ [OP_META_MULT2] = "mult2 ",
+ [OP_META_MULTU2] = "multu2 ",
+ [OP_META_LWU] = "lwu ",
+ [OP_META_SWU] = "swu ",
};
static const char * const special_opcodes[] = {
};
static const char * const special_opcodes[] = {
@@
-329,7
+333,7
@@
static int print_op_special(union code c, char *buf, size_t len,
lightrec_reg_name(c.r.rs),
lightrec_reg_name(c.r.rt));
default:
lightrec_reg_name(c.r.rs),
lightrec_reg_name(c.r.rt));
default:
- return snprintf(buf, len, "unknown (
0x%08x
)", c.opcode);
+ return snprintf(buf, len, "unknown (
"X32_FMT"
)", c.opcode);
}
}
}
}
@@
-358,7
+362,7
@@
static int print_op_cp(union code c, char *buf, size_t len, unsigned int cp)
case OP_CP0_RFE:
return snprintf(buf, len, "rfe ");
default:
case OP_CP0_RFE:
return snprintf(buf, len, "rfe ");
default:
- return snprintf(buf, len, "unknown (
0x%08x
)", c.opcode);
+ return snprintf(buf, len, "unknown (
"X32_FMT"
)", c.opcode);
}
}
}
}
}
}
@@
-376,7
+380,7
@@
static int print_op(union code c, u32 pc, char *buf, size_t len,
case OP_REGIMM:
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
case OP_REGIMM:
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
- return snprintf(buf, len, "%s%s,0x%
x"
,
+ return snprintf(buf, len, "%s%s,0x%
"PRIx32
,
regimm_opcodes[c.i.rt],
lightrec_reg_name(c.i.rs),
pc + 4 + ((s16)c.i.imm << 2));
regimm_opcodes[c.i.rt],
lightrec_reg_name(c.i.rs),
pc + 4 + ((s16)c.i.imm << 2));
@@
-384,14
+388,14
@@
static int print_op(union code c, u32 pc, char *buf, size_t len,
case OP_JAL:
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
case OP_JAL:
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
- return snprintf(buf, len, "%s0x%
x"
,
+ return snprintf(buf, len, "%s0x%
"PRIx32
,
std_opcodes[c.i.op],
(pc & 0xf0000000) | (c.j.imm << 2));
case OP_BEQ:
if (c.i.rs == c.i.rt) {
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
std_opcodes[c.i.op],
(pc & 0xf0000000) | (c.j.imm << 2));
case OP_BEQ:
if (c.i.rs == c.i.rt) {
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
- return snprintf(buf, len, "b 0x%
x"
,
+ return snprintf(buf, len, "b 0x%
"PRIx32
,
pc + 4 + ((s16)c.i.imm << 2));
}
fallthrough;
pc + 4 + ((s16)c.i.imm << 2));
}
fallthrough;
@@
-400,7
+404,7
@@
static int print_op(union code c, u32 pc, char *buf, size_t len,
case OP_BGTZ:
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
case OP_BGTZ:
*flags_ptr = opcode_branch_flags;
*nb_flags = ARRAY_SIZE(opcode_branch_flags);
- return snprintf(buf, len, "%s%s,%s,0x%
x"
,
+ return snprintf(buf, len, "%s%s,%s,0x%
"PRIx32
,
std_opcodes[c.i.op],
lightrec_reg_name(c.i.rs),
lightrec_reg_name(c.i.rt),
std_opcodes[c.i.op],
lightrec_reg_name(c.i.rs),
lightrec_reg_name(c.i.rt),
@@
-444,6
+448,8
@@
static int print_op(union code c, u32 pc, char *buf, size_t len,
case OP_SWL:
case OP_SW:
case OP_SWR:
case OP_SWL:
case OP_SW:
case OP_SWR:
+ case OP_META_LWU:
+ case OP_META_SWU:
*flags_ptr = opcode_io_flags;
*nb_flags = ARRAY_SIZE(opcode_io_flags);
*is_io = true;
*flags_ptr = opcode_io_flags;
*nb_flags = ARRAY_SIZE(opcode_io_flags);
*is_io = true;
@@
-476,7
+482,7
@@
static int print_op(union code c, u32 pc, char *buf, size_t len,
lightrec_reg_name(get_mult_div_lo(c)),
lightrec_reg_name(c.r.rs), c.r.op);
default:
lightrec_reg_name(get_mult_div_lo(c)),
lightrec_reg_name(c.r.rs), c.r.op);
default:
- return snprintf(buf, len, "unknown (
0x%08x
)", c.opcode);
+ return snprintf(buf, len, "unknown (
"X32_FMT"
)", c.opcode);
}
}
}
}
@@
-512,7
+518,7
@@
void lightrec_print_disassembly(const struct block *block, const u32 *code_ptr)
print_flags(buf3, sizeof(buf3), op, flags_ptr, nb_flags, is_io);
print_flags(buf3, sizeof(buf3), op, flags_ptr, nb_flags, is_io);
- printf(
"0x%08x
(0x%x)\t%s%*c%s%*c%s\n", pc, i << 2,
+ printf(
X32_FMT"
(0x%x)\t%s%*c%s%*c%s\n", pc, i << 2,
buf, 30 - (int)count, ' ', buf2, 30 - (int)count2, ' ', buf3);
}
}
buf, 30 - (int)count, ' ', buf2, 30 - (int)count2, ' ', buf3);
}
}