From: Matheus Ferst<matheus.ferst@eldorado.org.br>
Implements the Convert Binary Coded Decimal To Declets instruction.
Since libdecnumber doesn't expose the methods for direct conversion
(decDigitsToDPD, BCD2DPD, etc.), the BCD values are converted to
decimal32 format, from which the declets are extracted.
Where the behavior is undefined, we try to match the result observed in
a POWER9 DD2.3.
Signed-off-by: Matheus Ferst<matheus.ferst@eldorado.org.br>
Signed-off-by: Víctor Colombo<victor.colombo@eldorado.org.br>
---
target/ppc/dfp_helper.c | 39 ++++++++++++++++++++++
target/ppc/helper.h | 1 +
target/ppc/insn32.decode | 4 +++
target/ppc/translate/fixedpoint-impl.c.inc | 7 ++++
4 files changed, 51 insertions(+)