qemu/target
Stefan Brankovic 1cc792698e target/ppc: Optimize emulation of lvsl and lvsr instructions
Adding simple macro that is calling tcg implementation of appropriate
instruction if altivec support is active.

Optimization of altivec instruction lvsl (Load Vector for Shift Left).
Place bytes sh:sh+15 of value 0x00 || 0x01 || 0x02 || ... || 0x1E || 0x1F
in destination register. Sh is calculated by adding 2 source registers and
getting bits 60-63 of result.

First, the bits [28-31] are placed from EA to variable sh. After that,
the bytes are created in the following way:
sh:(sh+7) of X(from description) by multiplying sh with 0x0101010101010101
followed by addition of the result with 0x0001020304050607. Value obtained
is placed in higher doubleword element of vD.
(sh+8):(sh+15) by adding the result of previous multiplication with
0x08090a0b0c0d0e0f. Value obtained is placed in lower doubleword element
of vD.

Optimization of altivec instruction lvsr (Load Vector for Shift Right).
Place bytes 16-sh:31-sh of value 0x00 || 0x01 || 0x02 || ... || 0x1E ||
0x1F in destination register. Sh is calculated by adding 2 source
registers and getting bits 60-63 of result.

First, the bits [28-31] are placed from EA to variable sh. After that,
the bytes are created in the following way:
sh:(sh+7) of X(from description) by multiplying sh with 0x0101010101010101
followed by substraction of the result from 0x1011121314151617. Value
obtained is placed in higher doubleword element of vD.
(sh+8):(sh+15) by substracting the result of previous multiplication from
0x18191a1b1c1d1e1f. Value obtained is placed in lower doubleword element
of vD.

Signed-off-by: Stefan Brankovic <stefan.brankovic@rt-rk.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <1563200574-11098-2-git-send-email-stefan.brankovic@rt-rk.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-08-21 17:17:11 +10:00
..
alpha targets (various): use softfloat-helpers.h where we can 2019-08-19 12:07:13 +01:00
arm target-arm queue: 2019-08-16 17:21:40 +01:00
cris Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
hppa sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
i386 sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
lm32 sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
m68k target/m68k: replace LIT64 with UINT64_C macros 2019-08-19 12:07:13 +01:00
microblaze targets (various): use softfloat-helpers.h where we can 2019-08-19 12:07:13 +01:00
mips target/mips: Style improvements in translate.c 2019-08-19 19:53:37 +02:00
moxie Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
nios2 Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
openrisc Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
ppc target/ppc: Optimize emulation of lvsl and lvsr instructions 2019-08-21 17:17:11 +10:00
riscv Implement parameter fields. 2019-08-19 16:55:30 +01:00
s390x targets (various): use softfloat-helpers.h where we can 2019-08-19 12:07:13 +01:00
sh4 targets (various): use softfloat-helpers.h where we can 2019-08-19 12:07:13 +01:00
sparc sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tilegx Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
tricore targets (various): use softfloat-helpers.h where we can 2019-08-19 12:07:13 +01:00
unicore32 targets (various): use softfloat-helpers.h where we can 2019-08-19 12:07:13 +01:00
xtensa Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00