qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/19] General Support for VSX Helpers


From: Tom Musta
Subject: Re: [Qemu-devel] [PATCH 03/19] General Support for VSX Helpers
Date: Thu, 24 Oct 2013 15:42:19 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1

On 10/24/2013 1:51 PM, Richard Henderson wrote:
On 10/24/2013 09:19 AM, Tom Musta wrote:

+#define GEN_VSX_HELPER_2(name, op1, op2, inval, type)                         \
+static void gen_##name(DisasContext * ctx)                                    \
+{                                                                             \
+    TCGv_i32 opc;                                                             \
+    if (unlikely(!ctx->vsx_enabled)) {                                        \
+        gen_exception(ctx, POWERPC_EXCP_VSXU);                                \
+        return;                                                               \
+    }                                                                         \
+    /* NIP cannot be restored if the memory exception comes from an helper */ \
+    gen_update_nip(ctx, ctx->nip - 4);                                        \
+    opc = tcg_const_i32(ctx->opcode);                                         \
+    gen_helper_##name(cpu_env, opc);                                          \
+    tcg_temp_free_i32(opc);                                                   \
+}

I'm not a fan of delaying decode to the helpers...

You're mostly doing this to avoid passing 3-4 arguments
for the register numbers?

Because the VSRs are 128 bits wide and because there is an interesting 
relationship
with the FPRs and AVRs, passing 6 or more arguments would typically be required
(2 per VSR).  And, they would need to be stitched back together into a single
structure in order to use the loops in the vector routines.  I did prototype 
something
like this and didn't like it.

Unless you are suggesting that the decoded VSR index (0..63) be passed to the 
helper?




reply via email to

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