qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 15/15] target/ppc: Check cpu flags for prefixed insn suppo


From: Richard Henderson
Subject: Re: [PATCH v2 15/15] target/ppc: Check cpu flags for prefixed insn support
Date: Wed, 28 Apr 2021 08:37:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/27/21 10:16 AM, Luis Pires wrote:
Prefixed instructions were introduced in Power ISA 3.1

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
---
  target/ppc/translate.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 7422ea4e13..f4802a4f08 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -7837,7 +7837,11 @@ static bool ppc_tr_breakpoint_check(DisasContextBase 
*dcbase, CPUState *cs,
static bool is_prefix_insn(DisasContext *ctx, uint32_t insn)
  {
-    /* TODO: Check ctx->insns_flags* for whether prefixes are supported. */
+    if (!(ctx->insns_flags2 & PPC2_ISA310)) {
+        /* Prefixed instructions are not supported */
+        return false;
+    }

Patch 11 introduced REQUIRE_INSNS_FLAGS; this pattern calls for the introduction of REQUIRE_INSNS_FLAGS2, as you'll need it later.

Fold this back into patch 8, or move this to be patch 9, so that we don't have a range of patches which accept invalid instructions.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]