diff --git a/librz/analysis/p/analysis_arm_cs.c b/librz/analysis/p/analysis_arm_cs.c index 7ad788816aa..95ca7bde18f 100644 --- a/librz/analysis/p/analysis_arm_cs.c +++ b/librz/analysis/p/analysis_arm_cs.c @@ -1737,7 +1737,7 @@ static int analysis_op(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *bu int n, ret; mode |= (a->big_endian) ? CS_MODE_BIG_ENDIAN : CS_MODE_LITTLE_ENDIAN; if (RZ_STR_ISNOTEMPTY(a->cpu)) { - if (strstr(a->cpu, "cortex")) { + if (strstr(a->cpu, "cortexm") || strstr(a->cpu, "cortex-m")) { mode |= CS_MODE_MCLASS; } if (a->bits != 64 && strstr(a->cpu, "v8")) { diff --git a/librz/asm/p/asm_arm_cs.c b/librz/asm/p/asm_arm_cs.c index 5b614dd066a..de5bac5e9d1 100644 --- a/librz/asm/p/asm_arm_cs.c +++ b/librz/asm/p/asm_arm_cs.c @@ -102,7 +102,7 @@ static int disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len) { } if (a->cpu) { - if (strstr(a->cpu, "cortex")) { + if (strstr(a->cpu, "cortexm") || strstr(a->cpu, "cortex-m")) { mode |= CS_MODE_MCLASS; } if (a->bits != 64) { @@ -298,7 +298,7 @@ static char *mnemonics(RzAsm *a, int id, bool json) { RzAsmPlugin rz_asm_plugin_arm_cs = { .name = "arm", .desc = "Capstone ARM disassembler", - .cpus = "v8,cortex,arm1176,cortexA72,cortexA8", + .cpus = "v8,cortexm,arm1176,cortexA72,cortexA8", .platforms = "bcm2835,omap3430", .features = "v8", .license = "BSD", diff --git a/test/db/asm/arm_cortex_16 b/test/db/asm/arm_cortexm_16 similarity index 50% rename from test/db/asm/arm_cortex_16 rename to test/db/asm/arm_cortexm_16 index c39296777a4..3bd403e7f9e 100644 --- a/test/db/asm/arm_cortex_16 +++ b/test/db/asm/arm_cortexm_16 @@ -1 +1,2 @@ d "mrs r0, primask" eff31080 +d "msr basepri, r3" 83f31188 diff --git a/test/db/cmd/cmd_pd b/test/db/cmd/cmd_pd index 5fcca744028..49c79c0df2e 100644 --- a/test/db/cmd/cmd_pd +++ b/test/db/cmd/cmd_pd @@ -32,15 +32,15 @@ EXPECT=<