From a2c085b90b801f0b5fcb170ad2e5735c7de39873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Wed, 2 Sep 2020 17:20:46 -0700 Subject: [PATCH] systemz: pad instruction width up to 6 bytes instructions could be 2, 4 or 6 bytes so pad accordingly as it was done on the other CISC architecture. --- cstool/cstool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cstool/cstool.c b/cstool/cstool.c index a45dcd055d..48344429fb 100644 --- a/cstool/cstool.c +++ b/cstool/cstool.c @@ -455,12 +455,16 @@ int main(int argc, char **argv) putchar(' '); printf("%02x", insn[i].bytes[j]); } - // X86 instruction size is variable. + // X86 and s390 instruction sizes are variable. // align assembly instruction after the opcode if (arch == CS_ARCH_X86) { for (; j < 16; j++) { printf(" "); } + } else if (arch == CS_ARCH_SYSZ) { + for (; j < 6; j++) { + printf(" "); + } } printf(" %s\t%s\n", insn[i].mnemonic, insn[i].op_str);