OSDN Git Service

target-ppc: Altivec 2.07: Add Support for R-Form Dual Instructions
authorTom Musta <tommusta@gmail.com>
Wed, 12 Feb 2014 21:22:57 +0000 (15:22 -0600)
committerAlexander Graf <agraf@suse.de>
Wed, 5 Mar 2014 02:06:53 +0000 (03:06 +0100)
commita737d3ebc8ece5728c2d98b725652b7a0056d593
tree141139358a1ebcc4bc4138043f0b5e72caea831c
parent50f5fc0cf24fbc12434a5ad6e3784341f92e23bd
target-ppc: Altivec 2.07: Add Support for R-Form Dual Instructions

Some Alitvec instructions introduced in Power ISA Version 2.07 use bit 31
(aka the "Rc" bit) as an opcode but also use bit 21 as an actual Rc
bit.  QEMU for PowerPC typically uses bits 0-5 and 21-30 for opcodes.

This patch introduces a generator macro that injects an auxiliary handler
which decodes both bits 21 and 31 and invokes one of four standard
handlers.  Since the instructions are not, in general, from the same version
of the ISA, two sets of PPC_*/PPC2_* flags are supported.

This patch also introduces a macro to insert two entries into the opcode
table -- one for bit 21 equal to 0 and one for bit 21 equal to 1.

Signed-off-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/translate.c