qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/4] target-ppc: implement xxbr[qdwh] instructio


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 3/4] target-ppc: implement xxbr[qdwh] instruction
Date: Mon, 10 Oct 2016 10:33:21 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 10/07/2016 01:57 PM, Nikunj A Dadhania wrote:
+static void gen_xxbrq(DisasContext *ctx)
+{
+    TCGv_i64 xth = cpu_vsrh(xT(ctx->opcode));
+    TCGv_i64 xtl = cpu_vsrl(xT(ctx->opcode));
+    TCGv_i64 xbh = cpu_vsrh(xB(ctx->opcode));
+    TCGv_i64 xbl = cpu_vsrl(xB(ctx->opcode));
+
+    if (unlikely(!ctx->vsx_enabled)) {
+        gen_exception(ctx, POWERPC_EXCP_VSXU);
+        return;
+    }
+    tcg_gen_bswap64_i64(xth, xbl);
+    tcg_gen_bswap64_i64(xtl, xbh);
+}

You need a temporary for the case of T==B. You don't want to overwrite XBH with XTH before you consume the input.


r~



reply via email to

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