summaryrefslogtreecommitdiff
path: root/target/ppc/translate/vmx-ops.inc.c
diff options
context:
space:
mode:
authorJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>2017-01-10 00:10:12 -0200
committerDavid Gibson <david@gibson.dropbear.id.au>2017-01-31 10:10:14 +1100
commita54238adac8e6fc4ba8bffe8299216b73ef3d3ee (patch)
tree99e324e66d452da92a8b5e5b7ae8280f0a9aaa4f /target/ppc/translate/vmx-ops.inc.c
parenta49a95e9e4dc2652cdc8a1e4fb1bfb66dba2e1d8 (diff)
downloadqemu-a54238adac8e6fc4ba8bffe8299216b73ef3d3ee.zip
ppc: Implement bcdsr. instruction
bcdsr.: Decimal shift and round. This instruction works like bcds. however, when performing right shift, 1 will be added to the result if the last digit was >= 5. 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-ops.inc.c')
-rw-r--r--target/ppc/translate/vmx-ops.inc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/ppc/translate/vmx-ops.inc.c b/target/ppc/translate/vmx-ops.inc.c
index cdd3abe600..fa9c996fa8 100644
--- a/target/ppc/translate/vmx-ops.inc.c
+++ b/target/ppc/translate/vmx-ops.inc.c
@@ -132,6 +132,8 @@ GEN_HANDLER_E_2(vprtybd, 0x4, 0x1, 0x18, 9, 0, PPC_NONE, PPC2_ISA300),
GEN_HANDLER_E_2(vprtybq, 0x4, 0x1, 0x18, 10, 0, PPC_NONE, PPC2_ISA300),
GEN_VXFORM_DUAL(vsubcuw, xpnd04_1, 0, 22, PPC_ALTIVEC, PPC_NONE),
+GEN_VXFORM_300(bcdsr, 0, 23),
+GEN_VXFORM_300(bcdsr, 0, 31),
GEN_VXFORM_DUAL(vaddubs, vmul10uq, 0, 8, PPC_ALTIVEC, PPC_NONE),
GEN_VXFORM_DUAL(vadduhs, vmul10euq, 0, 9, PPC_ALTIVEC, PPC_NONE),
GEN_VXFORM(vadduws, 0, 10),