[Top][All Lists]

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

Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH 0/6] target/ppc: convert VMX inst

From: Aleksandar Markovic
Subject: Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH 0/6] target/ppc: convert VMX instructions to use TCG vector operations
Date: Mon, 10 Dec 2018 14:04:28 +0100

On Dec 7, 2018 9:59 AM, "Mark Cave-Ayland" <address@hidden> wrote:
> This patchset is an attempt at trying to improve the VMX (Altivec) instruction
> performance by making use of the new TCG vector operations where possible.

Hello, Mark.

I just want to say that I support these efforts. Very interesting, it can bring significant improvements for multimedia intensive emulations. But, even more important, we can see new tcg vector interface in action, possibly suggest improvements, extensions.

I would just like to ask you to add some performance comparisons, if possible. Very simple tests would be sufficient.

Thanks again for this series!


> In order to use TCG vector operations, the registers must be accessible from cpu_env
> whilst currently they are accessed via arrays of static TCG globals. Patches 1-3
> are therefore mechanical patches which introduce access helpers for FPR, AVR and VSR
> registers using the supplied TCGv_i64 parameter.
> Once this is done, patch 4 enables us to remove the static TCG global arrays and updates
> the access helpers to read/write to the relevant fields in cpu_env directly.
> The final patches 5 and 6 convert the VMX logical instructions and addition/subtraction
> instructions respectively over to the TCG vector operations.
> NOTE: there are a lot of instructions that cannot (yet) be optimised to use TCG vector
> operations, however it struck me that there may be some potential for converting
> saturating add/sub and cmp instructions if there were a mechanism to return a set of
> flags indicating the result of the saturation/comparison.
> Finally thanks to Richard for taking the time to answer some of my (mostly beginner)
> questions related to TCG.
> Signed-off-by: Mark Cave-Ayland <address@hidden>
> Mark Cave-Ayland (6):
>   target/ppc: introduce get_fpr() and set_fpr() helpers for FP register
>     access
>   target/ppc: introduce get_avr64() and set_avr64() helpers for VMX
>     register access
>   target/ppc: introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}()
>     helpers for VSR register access
>   target/ppc: switch FPR, VMX and VSX helpers to access data directly
>     from cpu_env
>   target/ppc: convert VMX logical instructions to use vector operations
>   target/ppc: convert vaddu[b,h,w,d] and vsubu[b,h,w,d] over to use
>     vector operations
>  target/ppc/helper.h                 |   8 -
>  target/ppc/int_helper.c             |   7 -
>  target/ppc/translate.c              |  72 ++--
>  target/ppc/translate/fp-impl.inc.c  | 492 ++++++++++++++++++-----
>  target/ppc/translate/vmx-impl.inc.c | 182 ++++++---
>  target/ppc/translate/vsx-impl.inc.c | 782 ++++++++++++++++++++++++++----------
>  6 files changed, 1110 insertions(+), 433 deletions(-)
> --
> 2.11.0

reply via email to

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