On Tue, 27 Aug 2019 at 11:46, Peter Maydell <peter.mayd...@linaro.org> wrote: > ...OK, not this specific function, as I just noticed it's the _a32 > one, but trans_STREXB(), trans_STREXH(), etc are wrong.
I did a quick grep through for places checking the 6K condition, and I think these are the only ones that need changing: diff --git a/target/arm/translate.c b/target/arm/translate.c index b4d53f3d37f..58e50f2d808 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8874,7 +8874,7 @@ static bool trans_STREXD_t32(DisasContext *s, arg_STREX *a) static bool trans_STREXB(DisasContext *s, arg_STREX *a) { - if (!ENABLE_ARCH_6K) { + if (!ENABLE_ARCH_6K && !arm_dc_feature(s, ARM_FEATURE_M)) { return false; } return op_strex(s, a, MO_8, false); @@ -8882,7 +8882,7 @@ static bool trans_STREXB(DisasContext *s, arg_STREX *a) static bool trans_STREXH(DisasContext *s, arg_STREX *a) { - if (!ENABLE_ARCH_6K) { + if (!ENABLE_ARCH_6K && !arm_dc_feature(s, ARM_FEATURE_M)) { return false; } return op_strex(s, a, MO_16, false); @@ -9004,7 +9004,7 @@ static bool trans_LDREXD_t32(DisasContext *s, arg_LDREX *a) static bool trans_LDREXB(DisasContext *s, arg_LDREX *a) { - if (!ENABLE_ARCH_6K) { + if (!ENABLE_ARCH_6K && !arm_dc_feature(s, ARM_FEATURE_M)) { return false; } return op_ldrex(s, a, MO_8, false); @@ -9012,7 +9012,7 @@ static bool trans_LDREXB(DisasContext *s, arg_LDREX *a) static bool trans_LDREXH(DisasContext *s, arg_LDREX *a) { - if (!ENABLE_ARCH_6K) { + if (!ENABLE_ARCH_6K && !arm_dc_feature(s, ARM_FEATURE_M)) { return false; } return op_ldrex(s, a, MO_16, false); @@ -10236,7 +10236,7 @@ static bool trans_CPS_v6m(DisasContext *s, arg_CPS_v6m *a) static bool trans_CLREX(DisasContext *s, arg_CLREX *a) { - if (!ENABLE_ARCH_6K) { + if (!ENABLE_ARCH_6K && !arm_dc_feature(s, ARM_FEATURE_M)) { return false; } gen_clrex(s); thanks -- PMM