Skip to content

Commit 47f05e0

Browse files
authored
systemz: pad instruction width up to 6 bytes (capstone-engine#1679)
instructions could be 2, 4 or 6 bytes so pad accordingly as it was done on the other CISC architecture.
1 parent 44db210 commit 47f05e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cstool/cstool.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,16 @@ int main(int argc, char **argv)
455455
putchar(' ');
456456
printf("%02x", insn[i].bytes[j]);
457457
}
458-
// X86 instruction size is variable.
458+
// X86 and s390 instruction sizes are variable.
459459
// align assembly instruction after the opcode
460460
if (arch == CS_ARCH_X86) {
461461
for (; j < 16; j++) {
462462
printf(" ");
463463
}
464+
} else if (arch == CS_ARCH_SYSZ) {
465+
for (; j < 6; j++) {
466+
printf(" ");
467+
}
464468
}
465469

466470
printf(" %s\t%s\n", insn[i].mnemonic, insn[i].op_str);

0 commit comments

Comments
 (0)