diff options
author | Luis Pires <luis.pires@eldorado.org.br> | 2021-10-29 16:24:06 -0300 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-11-09 10:32:52 +1100 |
commit | d39b2cc7d0b87d95bbecbd142179efdc0b85c4e5 (patch) | |
tree | 03acb1af4615971c0230ac9b9aa9bb41e0aecb94 /target/ppc/dfp_helper.c | |
parent | 86057426d037ca023632156777a28d8493eaeb9d (diff) | |
download | qemu-d39b2cc7d0b87d95bbecbd142179efdc0b85c4e5.zip qemu-d39b2cc7d0b87d95bbecbd142179efdc0b85c4e5.tar.gz qemu-d39b2cc7d0b87d95bbecbd142179efdc0b85c4e5.tar.bz2 |
target/ppc: Implement DCFFIXQQ
Implement the following PowerISA v3.1 instruction:
dcffixqq: DFP Convert From Fixed Quadword Quad
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-5-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/dfp_helper.c')
-rw-r--r-- | target/ppc/dfp_helper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/ppc/dfp_helper.c b/target/ppc/dfp_helper.c index 07341a6..6b837c4 100644 --- a/target/ppc/dfp_helper.c +++ b/target/ppc/dfp_helper.c @@ -970,6 +970,18 @@ static void CFFIX_PPs(struct PPC_DFP *dfp) DFP_HELPER_CFFIX(dcffix, 64) DFP_HELPER_CFFIX(dcffixq, 128) +void helper_DCFFIXQQ(CPUPPCState *env, ppc_fprp_t *t, ppc_avr_t *b) +{ + struct PPC_DFP dfp; + + dfp_prepare_decimal128(&dfp, NULL, NULL, env); + decNumberFromInt128(&dfp.t, (uint64_t)b->VsrD(1), (int64_t)b->VsrD(0)); + dfp_finalize_decimal128(&dfp); + CFFIX_PPs(&dfp); + + set_dfp128(t, &dfp.vt); +} + #define DFP_HELPER_CTFIX(op, size) \ void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) \ { \ |