From 01553a5135631415311e30c7b161edf09678eddd Mon Sep 17 00:00:00 2001 From: Rot127 Date: Mon, 18 Nov 2024 09:31:33 -0500 Subject: [PATCH] Add SPE option to cstool --- cs.c | 2 +- cstool/cstool.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cs.c b/cs.c index 126c31f889..f2b8553ffd 100644 --- a/cs.c +++ b/cs.c @@ -138,7 +138,7 @@ typedef struct cs_arch_config { PPC_global_init, \ PPC_option, \ ~(CS_MODE_LITTLE_ENDIAN | CS_MODE_32 | CS_MODE_64 | CS_MODE_BIG_ENDIAN \ - | CS_MODE_QPX | CS_MODE_PS | CS_MODE_BOOKE), \ + | CS_MODE_QPX | CS_MODE_PS | CS_MODE_BOOKE | CS_MODE_SPE), \ } #define CS_ARCH_CONFIG_SPARC \ { \ diff --git a/cstool/cstool.c b/cstool/cstool.c index af34548f66..2bfcbec4cf 100644 --- a/cstool/cstool.c +++ b/cstool/cstool.c @@ -136,12 +136,16 @@ static struct { { "ppc32be", "PowerPC 32-bit, big endian", CS_ARCH_PPC, CS_MODE_32 | CS_MODE_BIG_ENDIAN }, { "ppc32qpx", "PowerPC 32-bit, qpx, little endian", CS_ARCH_PPC, CS_MODE_32 | CS_MODE_QPX | CS_MODE_LITTLE_ENDIAN }, { "ppc32beqpx", "PowerPC 32-bit, qpx, big endian", CS_ARCH_PPC, CS_MODE_32 | CS_MODE_QPX | CS_MODE_BIG_ENDIAN }, + { "ppc32spe", "PowerPC 32-bit, spe, little endian", CS_ARCH_PPC, CS_MODE_32 | CS_MODE_SPE | CS_MODE_LITTLE_ENDIAN }, + { "ppc32bespe", "PowerPC 32-bit, spe, big endian", CS_ARCH_PPC, CS_MODE_32 | CS_MODE_SPE | CS_MODE_BIG_ENDIAN }, { "ppc32ps", "PowerPC 32-bit, ps, little endian", CS_ARCH_PPC, CS_MODE_32 | CS_MODE_PS | CS_MODE_LITTLE_ENDIAN }, { "ppc32beps", "PowerPC 32-bit, ps, big endian", CS_ARCH_PPC, CS_MODE_32 | CS_MODE_PS | CS_MODE_BIG_ENDIAN }, { "ppc64", "PowerPC 64-bit, little endian", CS_ARCH_PPC, CS_MODE_64 | CS_MODE_LITTLE_ENDIAN }, { "ppc64be", "PowerPC 64-bit, big endian", CS_ARCH_PPC, CS_MODE_64 | CS_MODE_BIG_ENDIAN }, { "ppc64qpx", "PowerPC 64-bit, qpx, little endian", CS_ARCH_PPC, CS_MODE_64 | CS_MODE_QPX | CS_MODE_LITTLE_ENDIAN }, { "ppc64beqpx", "PowerPC 64-bit, qpx, big endian", CS_ARCH_PPC, CS_MODE_64 | CS_MODE_QPX | CS_MODE_BIG_ENDIAN }, + { "ppc64spe", "PowerPC 64-bit, spe, little endian", CS_ARCH_PPC, CS_MODE_64 | CS_MODE_SPE | CS_MODE_LITTLE_ENDIAN }, + { "ppc64bespe", "PowerPC 64-bit, spe, big endian", CS_ARCH_PPC, CS_MODE_64 | CS_MODE_SPE | CS_MODE_BIG_ENDIAN }, { "sparc", "Sparc, big endian", CS_ARCH_SPARC, CS_MODE_BIG_ENDIAN }, { "sparcv9", "Sparc v9, big endian", CS_ARCH_SPARC, CS_MODE_BIG_ENDIAN | CS_MODE_V9 },