qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 2/4] target/ppc: Add support for SMT CTRL register


From: Cédric Le Goater
Subject: Re: [PATCH 2/4] target/ppc: Add support for SMT CTRL register
Date: Wed, 7 Jun 2023 07:31:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

Hello Nick,


--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -443,7 +443,7 @@ void spr_write_generic32(DisasContext *ctx, int sprn, int 
gprn)
  #endif
  }
-void spr_write_CTRL(DisasContext *ctx, int sprn, int gprn)
+static void spr_write_CTRL_ST(DisasContext *ctx, int sprn, int gprn)
  {
      /* This does not implement >1 thread */
      TCGv t0 = tcg_temp_new();
@@ -452,6 +452,22 @@ void spr_write_CTRL(DisasContext *ctx, int sprn, int gprn)
      tcg_gen_shli_tl(t1, t0, 8); /* Duplicate the bit in TS */
      tcg_gen_or_tl(t1, t1, t0);
      gen_store_spr(sprn, t1);

The hunk above doesn't apply cleanly. Am I missing some patch you would
have sent previously ?

Thanks,

C.



+}
+
+void spr_write_CTRL(DisasContext *ctx, int sprn, int gprn)
+{
+    if (!(ctx->flags & POWERPC_FLAG_SMT)) {
+        spr_write_CTRL_ST(ctx, sprn, gprn);
+        goto out;
+    }
+
+    if (!gen_serialize(ctx)) {
+        return;
+    }
+
+    gen_helper_spr_write_CTRL(cpu_env, tcg_constant_i32(sprn),
+                              cpu_gpr[gprn]);
+out:
      spr_store_dump_spr(sprn);
/*




reply via email to

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