qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 1/1] target-tricore: add missing 64-bit MOV in RLC format
@ 2014-12-12 11:25 Alex Züpke
  2014-12-12 13:26 ` Bastian Koppelmann
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Züpke @ 2014-12-12 11:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Bastian Koppelmann

Add the missing 64-bit "MOV Ex, simm16" variant in RLC format.

Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
-- 
diff --git a/target-tricore/tricore-opcodes.h b/target-tricore/tricore-opcodes.h
index 7aa6aed..a76a7e4 100644
--- a/target-tricore/tricore-opcodes.h
+++ b/target-tricore/tricore-opcodes.h
@@ -487,6 +487,7 @@ enum {
     OPC1_32_RLC_ADDIH_A                              = 0x11,
     OPC1_32_RLC_MFCR                                 = 0x4d,
     OPC1_32_RLC_MOV                                  = 0x3b,
+    OPC1_32_RLC_MOV_64                               = 0xfb, /* 1.6 only */
     OPC1_32_RLC_MOV_U                                = 0xbb,
     OPC1_32_RLC_MOV_H                                = 0x7b,
     OPC1_32_RLC_MOVH_A                               = 0x91,
diff --git a/target-tricore/translate.c b/target-tricore/translate.c
index c132223..e3eeedb 100644
--- a/target-tricore/translate.c
+++ b/target-tricore/translate.c
@@ -3781,6 +3781,17 @@ static void decode_rlc_opc(CPUTriCoreState *env, DisasContext *ctx,
     case OPC1_32_RLC_MOV:
         tcg_gen_movi_tl(cpu_gpr_d[r2], const16);
         break;
+    case OPC1_32_RLC_MOV_64:
+        if (tricore_feature(env, TRICORE_FEATURE_16)) {
+            if ((r2 & 0x1) != 0) {
+                /* TODO: raise OPD trap */
+            }
+            tcg_gen_movi_tl(cpu_gpr_d[r2], const16);
+            tcg_gen_movi_tl(cpu_gpr_d[r2+1], const16 >> 16);
+        } else {
+            /* TODO: raise illegal opcode trap */
+        }
+        break;
     case OPC1_32_RLC_MOV_U:
         const16 = MASK_OP_RLC_CONST16(ctx->opcode);
         tcg_gen_movi_tl(cpu_gpr_d[r2], const16);
@@ -4021,6 +4032,7 @@ static void decode_32Bit_opc(CPUTriCoreState *env, DisasContext *ctx)
     case OPC1_32_RLC_ADDIH_A:
     case OPC1_32_RLC_MFCR:
     case OPC1_32_RLC_MOV:
+    case OPC1_32_RLC_MOV_64:
     case OPC1_32_RLC_MOV_U:
     case OPC1_32_RLC_MOV_H:
     case OPC1_32_RLC_MOVH_A:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] target-tricore: add missing 64-bit MOV in RLC format
  2014-12-12 11:25 [Qemu-devel] [PATCH v1 1/1] target-tricore: add missing 64-bit MOV in RLC format Alex Züpke
@ 2014-12-12 13:26 ` Bastian Koppelmann
  0 siblings, 0 replies; 2+ messages in thread
From: Bastian Koppelmann @ 2014-12-12 13:26 UTC (permalink / raw)
  To: Alex Züpke, qemu-devel


On 12/12/2014 11:25 AM, Alex Züpke wrote:
> Add the missing 64-bit "MOV Ex, simm16" variant in RLC format.
>
> Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
Again malformed as in your other patch. Other than that, it looks good.

Cheers,
Bastian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-12 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-12 11:25 [Qemu-devel] [PATCH v1 1/1] target-tricore: add missing 64-bit MOV in RLC format Alex Züpke
2014-12-12 13:26 ` Bastian Koppelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).