diff options
author | Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com> | 2017-01-12 18:08:32 -0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-01-31 10:10:14 +1100 |
commit | 31bc4d114af6030a2ea9de8051f7edf28b4d4291 (patch) | |
tree | 9455f1674a07995bf06b2357226f391428165f70 /target/ppc/translate/vmx-impl.inc.c | |
parent | 8178e89cbc0711d690bbd5b049b1f36212bd5088 (diff) |
ppc: Implement bcdtrunc. instruction
bcdtrunc.: Decimal integer truncate. Given a BCD number in vrb and the
number of bytes to truncate in vra, the return register will have vrb
with such bits truncated.
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/translate/vmx-impl.inc.c')
-rw-r--r-- | target/ppc/translate/vmx-impl.inc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/ppc/translate/vmx-impl.inc.c b/target/ppc/translate/vmx-impl.inc.c index 451abb5064..1683f42167 100644 --- a/target/ppc/translate/vmx-impl.inc.c +++ b/target/ppc/translate/vmx-impl.inc.c @@ -1019,6 +1019,7 @@ GEN_BCD(bcdcpsgn); GEN_BCD(bcds); GEN_BCD(bcdus); GEN_BCD(bcdsr); +GEN_BCD(bcdtrunc); static void gen_xpnd04_1(DisasContext *ctx) { @@ -1097,6 +1098,10 @@ GEN_VXFORM_DUAL(vsubudm, PPC2_ALTIVEC_207, PPC_NONE, \ bcds, PPC_NONE, PPC2_ISA300) GEN_VXFORM_DUAL(vsubuwm, PPC_ALTIVEC, PPC_NONE, \ bcdus, PPC_NONE, PPC2_ISA300) +GEN_VXFORM_DUAL(vsubsbs, PPC_ALTIVEC, PPC_NONE, \ + bcdtrunc, PPC_NONE, PPC2_ISA300) +GEN_VXFORM_DUAL(vsubuqm, PPC2_ALTIVEC_207, PPC_NONE, \ + bcdtrunc, PPC_NONE, PPC2_ISA300) static void gen_vsbox(DisasContext *ctx) { |