[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [RFC PATCH 0/6] target/ppc: convert VMX instructions to use T
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-ppc] [RFC PATCH 0/6] target/ppc: convert VMX instructions to use TCG vector operations |
Date: |
Fri, 7 Dec 2018 08:56:29 +0000 |
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.
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