Convert To Fixed Quad
dxex:DFP Extract Biased Exponent
dxexq: DFP Extract Biased Exponent Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 20 +--
target/ppc/helper.h | 20
Move the following instructions to decodetree:
dtstdc: DFP Test Data Class
dtstdcq: DFP Test Data Class Quad
dtstdg: DFP Test Data Group
dtstdgq: DFP Test Data Group Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c
Move the following instructions to decodetree:
dqua: DFP Quantize
dquaq: DFP Quantize Quad
drrnd: DFP Reround
drrndq: DFP Reround Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 8 ++---
target
Without Inexact Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 12 +++
target/ppc/helper.h | 12 +++
target/ppc/insn32.decode| 23 +
target/ppc/translate/dfp
Implement the following PowerISA v3.1 instruction:
dcffixqq: DFP Convert From Fixed Quadword Quad
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 12
target/ppc/helper.h | 1 +
target/ppc/insn32.decode
This will be used to implement PowerPC's dcffixqq.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/libdecnumber/decNumber.h | 2 ++
libdecnumber/decNumber.c | 36
2 files changed, 38 insertions(+)
diff --git a/include/libdecn
Implement the following PowerISA v3.1 instruction:
dctfixqq: DFP Convert To Fixed Quadword Quad
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 52 +
target/ppc/helper.h | 1 +
target/ppc/insn32
-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 20 +--
target/ppc/helper.h | 20 +--
target/ppc/insn32.decode| 31 ++--
target/ppc/translate/dfp-impl.c.inc | 56
decNumberIntegralToInt128
Changes in v2:
- Renamed abs64() to uabs64()
Bruno Larsen (1):
target/ppc: Move REQUIRE_ALTIVEC/VECTOR to translate.c
Fernando Valle (1):
target/ppc: Introduce REQUIRE_FPU
Luis Pires (13):
libdecnumber: introduce decNumberFrom[U]Int128
target/ppc: Implement DCFFIXQ
This will be used to implement PowerPC's dctfixqq.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/libdecnumber/decNumber.h | 2 +
include/libdecnumber/decNumberLocal.h | 2 +-
libdecnumber/decContext.c | 7 +-
libdecnumber/decNumber.c
Before moving the existing DFP instructions to decodetree, drop the
nip update that shouldn't be done for these instructions.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/translate/dfp-impl.c.inc | 8
1 file changed, 8 deletions(-)
diff --git a/targe
Significand Right Immediate
dscriq: DFP Shift Significand Right Immediate Quad
Also deleted dfp-ops.c.inc, now that all PPC DFP instructions were
moved to decodetree.
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c
From: Fernando Valle
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/translate.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index c2fafebd1c..48a484eef6 100644
--- a/target
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/qemu/host-utils.h | 36
1 file changed, 36 insertions(+)
diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
index a3a7ced78d..ca979dc6cc 100644
--- a/include/qemu/host
Significance Quad
dtstsfi: DFP Test Significance Immediate
dtstsfiq: DFP Test Significance Immediate Quad
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 20
target/ppc/helper.h | 20
target/ppc/insn32.decode
From: Bruno Larsen
Move REQUIRE_ALTIVEC to translate.c and rename it to REQUIRE_VECTOR.
Signed-off-by: Bruno Larsen
Signed-off-by: Matheus Ferst
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
Acked-by: David Gibson
---
target/ppc/translate.c
Significand Right Immediate
dscriq: DFP Shift Significand Right Immediate Quad
Also deleted dfp-ops.c.inc, now that all PPC DFP instructions were
moved to decodetree.
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c
Convert To Fixed Quad
dxex:DFP Extract Biased Exponent
dxexq: DFP Extract Biased Exponent Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 20 +--
target/ppc/helper.h | 20
Move the following instructions to decodetree:
dqua: DFP Quantize
dquaq: DFP Quantize Quad
drrnd: DFP Reround
drrndq: DFP Reround Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 8 ++---
target
Implement the following PowerISA v3.1 instruction:
dctfixqq: DFP Convert To Fixed Quadword Quad
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 52 +
target/ppc/helper.h | 1 +
target/ppc/insn32
This will be used to implement PowerPC's dctfixqq.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/libdecnumber/decNumber.h | 2 +
include/libdecnumber/decNumberLocal.h | 2 +-
libdecnumber/decContext.c | 7 +-
libdecnumber/decNumber.c
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/qemu/host-utils.h | 36
1 file changed, 36 insertions(+)
diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
index a3a7ced78d..ca979dc6cc 100644
--- a/include/qemu/host
From: Fernando Valle
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/translate.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index c2fafebd1c..48a484eef6 100644
--- a/target
From: Bruno Larsen
Move REQUIRE_ALTIVEC to translate.c and rename it to REQUIRE_VECTOR.
Signed-off-by: Bruno Larsen
Signed-off-by: Matheus Ferst
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
Acked-by: David Gibson
---
target/ppc/translate.c
Significance Quad
dtstsfi: DFP Test Significance Immediate
dtstsfiq: DFP Test Significance Immediate Quad
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 20
target/ppc/helper.h | 20
target/ppc/insn32.decode
Without Inexact Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 12 +++
target/ppc/helper.h | 12 +++
target/ppc/insn32.decode| 23 +
target/ppc/translate/dfp
This will be used to implement PowerPC's dcffixqq.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/libdecnumber/decNumber.h | 2 ++
libdecnumber/decNumber.c | 36
2 files changed, 38 insertions(+)
diff --git a/include/libdecn
-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 20 +--
target/ppc/helper.h | 20 +--
target/ppc/insn32.decode| 31 ++--
target/ppc/translate/dfp-impl.c.inc | 56
Before moving the existing DFP instructions to decodetree, drop the
nip update that shouldn't be done for these instructions.
Signed-off-by: Luis Pires
---
target/ppc/translate/dfp-impl.c.inc | 8
1 file changed, 8 deletions(-)
diff --git a/target/ppc/translate/dfp-impl.c.i
Move the following instructions to decodetree:
dtstdc: DFP Test Data Class
dtstdcq: DFP Test Data Class Quad
dtstdg: DFP Test Data Group
dtstdgq: DFP Test Data Group Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
tests/unit/meson.build | 1 +
tests/unit/test-div128.c | 197 +++
2 files changed, 198 insertions(+)
create mode 100644 tests/unit/test-div128.c
diff --git a/tests/unit/meson.build b/tests
In preparation for changing the divu128/divs128 implementations
to allow for quotients larger than 64 bits, move the div-by-zero
and overflow checks to the callers.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/hw/clock.h| 5 +++--
include/qemu/host-utils.h | 36
These will be used to implement new decimal floating point
instructions from Power ISA 3.1.
The remainder is now returned directly by divu128/divs128,
freeing up phigh to receive the high 64 bits of the quotient.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/hw/clock.h
Implement the following PowerISA v3.1 instruction:
dcffixqq: DFP Convert From Fixed Quadword Quad
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/dfp_helper.c | 12
target/ppc/helper.h | 1 +
target/ppc/insn32.decode
Move udiv_qrnnd() from include/fpu/softfloat-macros.h to host-utils,
so it can be reused by divu128().
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/fpu/softfloat-macros.h | 82 --
include/qemu/host-utils.h | 81
line' from times_* functions in ppc/translate.c
- Used uadd64_overflow in mulu128
- Removed unnecessary 'else' from decNumberIntegralToInt128
Changes in v2:
- Renamed abs64() to uabs64()
Bruno Larsen (1):
target/ppc: Move REQUIRE_ALTIVEC/VECTOR to translate.c
Fernando Valle (1)
Without Inexact Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 12 +++
target/ppc/helper.h | 12 +++
target/ppc/insn32.decode| 23 +
target/ppc/translate/dfp-impl.c.inc | 52
-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 20 +-
target/ppc/helper.h | 20 +-
target/ppc/insn32.decode| 31 +++-
target/ppc/translate/dfp-impl.c.inc | 57
Implement the following PowerISA v3.1 instruction:
dctfixqq: DFP Convert To Fixed Quadword Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 53 +
target/ppc/helper.h | 1 +
target/ppc/insn32.decode| 5 +++
target
Significand Right Immediate
dscriq: DFP Shift Significand Right Immediate Quad
Also deleted dfp-ops.c.inc, now that all PPC DFP instructions were
moved to decodetree.
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 16 -
target/ppc
Convert To Fixed Quad
dxex:DFP Extract Biased Exponent
dxexq: DFP Extract Biased Exponent Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 20 +--
target/ppc/helper.h | 20 +--
target/ppc/insn32.decode
From: Bruno Larsen
Move REQUIRE_ALTIVEC to translate.c and rename it to REQUIRE_VECTOR.
Signed-off-by: Bruno Larsen
Signed-off-by: Matheus Ferst
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
Acked-by: David Gibson
---
target/ppc/translate.c
Move the following instructions to decodetree:
dtstdc: DFP Test Data Class
dtstdcq: DFP Test Data Class Quad
dtstdg: DFP Test Data Group
dtstdgq: DFP Test Data Group Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 8
Significance Quad
dtstsfi: DFP Test Significance Immediate
dtstsfiq: DFP Test Significance Immediate Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 20
target/ppc/helper.h | 20
target/ppc/insn32.decode| 29 +++
target
This will be used to implement PowerPC's dcffixqq.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/libdecnumber/decNumber.h | 2 ++
libdecnumber/decNumber.c | 36
2 files changed, 38 insertions(+)
diff --git a/include/libdecn
Implement the following PowerISA v3.1 instruction:
dcffixqq: DFP Convert From Fixed Quadword Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 11 +++
target/ppc/helper.h | 1 +
target/ppc/insn32.decode| 8
target/ppc
This will be used to implement PowerPC's dctfixqq.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/libdecnumber/decNumber.h | 2 +
include/libdecnumber/decNumberLocal.h | 2 +-
libdecnumber/decContext.c | 7 +-
libdecnumber/decNumber.c
These will be used to implement new decimal floating point
instructions from Power ISA 3.1.
A new argument, prem, was added to divu128/divs128 to receive the
remainder, freeing up phigh to receive the high 64 bits of the
quotient.
Signed-off-by: Luis Pires
---
include/hw/clock.h| 8
Signed-off-by: Luis Pires
---
tests/unit/meson.build | 1 +
tests/unit/test-div128.c | 197 +++
2 files changed, 198 insertions(+)
create mode 100644 tests/unit/test-div128.c
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 5736d285b2
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
include/qemu/host-utils.h | 36
1 file changed, 36 insertions(+)
diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
index eee58c0874..8360146979 100644
--- a/include/qemu/host
Move udiv_qrnnd() from include/fpu/softfloat-macros.h to host-utils,
so it can be reused by divu128().
Signed-off-by: Luis Pires
---
include/fpu/softfloat-macros.h | 82 --
include/qemu/host-utils.h | 81 +
2 files changed, 81
Move the following instructions to decodetree:
dqua: DFP Quantize
dquaq: DFP Quantize Quad
drrnd: DFP Reround
drrndq: DFP Reround Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 8 ++---
target/ppc/helper.h | 8
From: Fernando Valle
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
target/ppc/translate.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 4749ecdaa9..5489b4b6e0 100644
--- a/target
The previous code didn't detect overflows if the high 64-bit
of the dividend were equal to the 64-bit divisor. In that case,
64 bits wouldn't be enough to hold the quotient.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
---
util/host-utils.c | 2 +-
1 file changed, 1 inser
Drop abs64() and use uabs64() from host-utils, which avoids
an undefined behavior when taking abs of the most negative value.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
Reviewed-by: Eduardo Habkost
---
hw/i386/kvm/i8254.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions
*plow (lower 64 bits of the dividend) is passed into divs128() as
a signed 64-bit integer. When building an __int128_t from it, it
must be zero-extended, instead of sign-extended.
Suggested-by: Richard Henderson
Signed-off-by: Luis Pires
---
include/qemu/host-utils.h | 2 +-
1 file changed, 1
Introduce uabs64(), a function that returns the absolute value of
a 64-bit int as an unsigned value. This avoids the undefined behavior
for common abs implementations, where abs of the most negative value is
undefined.
Signed-off-by: Luis Pires
Reviewed-by: Richard Henderson
Reviewed-by
In preparation for changing the divu128/divs128 implementations
to allow for quotients larger than 64 bits, move the div-by-zero
and overflow checks to the callers.
Signed-off-by: Luis Pires
---
include/hw/clock.h| 5 +++--
include/qemu/host-utils.h | 36
divu128/divs128
target/ppc: Implement DCFFIXQQ
target/ppc: Implement DCTFIXQQ
target/ppc: Move dcmp{u,o}[q],dts{tex,tsf,tsfi}[q] to decodetree
--
Luis Pires
Instituto de Pesquisas ELDORADO
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
Bruno Larsen (1):
Move the following instructions to decodetree:
dqua: DFP Quantize
dquaq: DFP Quantize Quad
drrnd: DFP Reround
drrndq: DFP Reround Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 8 ++---
target/ppc/helper.h | 8
Significance Quad
dtstsfi: DFP Test Significance Immediate
dtstsfiq: DFP Test Significance Immediate Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 20
target/ppc/helper.h | 20
target/ppc/insn32.decode| 29 +++
target
Significand Right Immediate
dscriq: DFP Shift Significand Right Immediate Quad
Also deleted dfp-ops.c.inc, now that all PPC DFP instructions were
moved to decodetree.
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 16 -
target/ppc
-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 20 +-
target/ppc/helper.h | 20 +-
target/ppc/insn32.decode| 31 +++-
target/ppc/translate/dfp-impl.c.inc | 57
Convert To Fixed Quad
dxex:DFP Extract Biased Exponent
dxexq: DFP Extract Biased Exponent Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 20 +--
target/ppc/helper.h | 20 +--
target/ppc/insn32.decode
Move the following instructions to decodetree:
dtstdc: DFP Test Data Class
dtstdcq: DFP Test Data Class Quad
dtstdg: DFP Test Data Group
dtstdgq: DFP Test Data Group Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 8
Without Inexact Quad
Signed-off-by: Luis Pires
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/dfp_helper.c | 12 +++
target/ppc/helper.h | 12 +++
target/ppc/insn32.decode| 23 +
target/ppc/translate/dfp-impl.c.inc | 52
Implement the following PowerISA v3.1 instruction:
dctfixqq: DFP Convert To Fixed Quadword Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 53 +
target/ppc/helper.h | 1 +
target/ppc/insn32.decode| 5 +++
target
From: Bruno Larsen
Move REQUIRE_ALTIVEC to translate.c and rename it to REQUIRE_VECTOR.
Signed-off-by: Bruno Larsen
Signed-off-by: Matheus Ferst
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
---
target/ppc/translate.c | 8
target/ppc/translate/vector
This will be used to implement PowerPC's dctfixqq.
Signed-off-by: Luis Pires
---
include/libdecnumber/decNumber.h | 2 +
include/libdecnumber/decNumberLocal.h | 2 +-
libdecnumber/decContext.c | 7 +-
libdecnumber/decNumber.c | 94 +
Signed-off-by: Luis Pires
---
include/qemu/host-utils.h | 38 ++
1 file changed, 38 insertions(+)
diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
index 6f18b29921..9f40077083 100644
--- a/include/qemu/host-utils.h
+++ b/include/qemu/host
Signed-off-by: Luis Pires
---
tests/unit/meson.build | 1 +
tests/unit/test-div128.c | 185 +++
2 files changed, 186 insertions(+)
create mode 100644 tests/unit/test-div128.c
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 5736d285b2
From: Fernando Valle
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
Reviewed-by: David Gibson
---
target/ppc/translate.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 4749ecdaa9..5489b4b6e0 100644
--- a/target/ppc
Implement the following PowerISA v3.1 instruction:
dcffixqq: DFP Convert From Fixed Quadword Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 11 +++
target/ppc/helper.h | 1 +
target/ppc/insn32.decode| 8
target/ppc
mproved, due to the
smaller number of shift-subtract iterations.
Signed-off-by: Luis Pires
---
include/hw/clock.h| 8 +--
include/qemu/host-utils.h | 20 --
target/ppc/int_helper.c | 13 ++--
util/host-utils.c | 128 +++---
4 files
Move abs64 to host-utils as uabs64, so it can be used elsewhere.
The function was renamed to uabs64 and modified to return an
unsigned value. This avoids the undefined behavior for common
abs implementations, where abs of the most negative value is
undefined.
Signed-off-by: Luis Pires
---
hw
In preparation for changing the divu128/divs128 implementations
to allow for quotients larger than 64 bits, move the div-by-zero
and overflow checks to the callers.
Signed-off-by: Luis Pires
---
include/hw/clock.h| 5 +++--
include/qemu/host-utils.h | 36
This will be used to implement PowerPC's dcffixqq.
Signed-off-by: Luis Pires
---
include/libdecnumber/decNumber.h | 2 ++
libdecnumber/decNumber.c | 36
2 files changed, 38 insertions(+)
diff --git a/include/libdecnumber/decNumber.h b/in
The previous code didn't detect overflows if the high 64-bit
of the dividend were equal to the 64-bit divisor. In that case,
64 bits wouldn't be enough to hold the quotient.
Signed-off-by: Luis Pires
---
util/host-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --
umberFrom[U]Int128
target/ppc: Implement DCFFIXQQ
host-utils: Introduce mulu128
libdecnumber: Introduce decNumberIntegralToInt128
target/ppc: Implement DCTFIXQQ
target/ppc: Move dcmp{u,o}[q],dts{tex,tsf,tsfi}[q] to decodetree
--
Luis Pires
Instituto de Pesquisas ELDORADO
Aviso Legal -
Significand Right Immediate
dscriq: DFP Shift Significand Right Immediate Quad
Also deleted dfp-ops.c.inc, now that all PPC DFP instructions were
moved to decodetree.
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 16 -
target/ppc/helper.h | 16
Move the following instructions to decodetree:
dqua: DFP Quantize
dquaq: DFP Quantize Quad
drrnd: DFP Reround
drrndq: DFP Reround Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 8 ++---
target/ppc/helper.h | 8 ++---
target/ppc/insn32.decode
Convert To Fixed Quad
dxex:DFP Extract Biased Exponent
dxexq: DFP Extract Biased Exponent Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 20 +--
target/ppc/helper.h | 20 +--
target/ppc/insn32.decode| 23
target
Move the following instructions to decodetree:
dtstdc: DFP Test Data Class
dtstdcq: DFP Test Data Class Quad
dtstdg: DFP Test Data Group
dtstdgq: DFP Test Data Group Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 8 +++
target/ppc/helper.h | 8
This will be used to implement PowerPC's dctfixqq.
Signed-off-by: Luis Pires
---
include/libdecnumber/decNumber.h | 2 +
include/libdecnumber/decNumberLocal.h | 2 +-
libdecnumber/decContext.c | 7 +-
libdecnumber/decNumber.c | 94 +
Without Inexact Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 12 +++
target/ppc/helper.h | 12 +++
target/ppc/insn32.decode| 23 +
target/ppc/translate/dfp-impl.c.inc | 52 +
target/ppc/translate
Signed-off-by: Luis Pires
---
include/qemu/host-utils.h | 38 ++
1 file changed, 38 insertions(+)
diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
index 8e8cab9a3e..2e3b5ad989 100644
--- a/include/qemu/host-utils.h
+++ b/include/qemu/host
Implement the following PowerISA v3.1 instruction:
dcffixqq: DFP Convert From Fixed Quadword Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 11 +++
target/ppc/helper.h | 1 +
target/ppc/insn32.decode| 8
target/ppc
-by: Luis Pires
---
target/ppc/dfp_helper.c | 20 +-
target/ppc/helper.h | 20 +-
target/ppc/insn32.decode| 31 +++-
target/ppc/translate/dfp-impl.c.inc | 57 ++---
target/ppc/translate/dfp-ops.c.inc | 19
Significance Quad
dtstsfi: DFP Test Significance Immediate
dtstsfiq: DFP Test Significance Immediate Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 20
target/ppc/helper.h | 20
target/ppc/insn32.decode| 29 +++
target
From: Bruno Larsen
Move REQUIRE_ALTIVEC to translate.c and rename it to REQUIRE_VECTOR.
Signed-off-by: Bruno Larsen
Signed-off-by: Matheus Ferst
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
---
target/ppc/translate.c | 8
target/ppc/translate/vector
From: Fernando Valle
Signed-off-by: Fernando Valle
Signed-off-by: Luis Pires
---
target/ppc/translate.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 4749ecdaa9..5489b4b6e0 100644
--- a/target/ppc/translate.c
+++ b/target/ppc
Implement the following PowerISA v3.1 instruction:
dctfixqq: DFP Convert To Fixed Quadword Quad
Signed-off-by: Luis Pires
---
target/ppc/dfp_helper.c | 53 +
target/ppc/helper.h | 1 +
target/ppc/insn32.decode| 5 +++
target
In preparation for changing the divu128/divs128 implementations
to allow for quotients larger than 64 bits, move the div-by-zero
and overflow checks to the callers.
Signed-off-by: Luis Pires
---
include/hw/clock.h| 5 +++--
include/qemu/host-utils.h | 36
Signed-off-by: Luis Pires
---
tests/unit/meson.build | 1 +
tests/unit/test-div128.c | 185 +++
2 files changed, 186 insertions(+)
create mode 100644 tests/unit/test-div128.c
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 5736d285b2
This will be used to implement PowerPC's dcffixqq.
Signed-off-by: Luis Pires
---
include/libdecnumber/decNumber.h | 2 ++
libdecnumber/decNumber.c | 36
2 files changed, 38 insertions(+)
diff --git a/include/libdecnumber/decNumber.h b/in
Move abs64 to host-utils so it can be reused elsewhere.
Also made it inline.
Signed-off-by: Luis Pires
---
hw/i386/kvm/i8254.c | 5 -
include/qemu/host-utils.h | 8
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index
mproved, due to the
smaller number of shift-subtract iterations.
Signed-off-by: Luis Pires
---
include/hw/clock.h| 8 +--
include/qemu/host-utils.h | 20 --
target/ppc/int_helper.c | 13 ++--
util/host-utils.c | 128 +++---
4 files
The previous code didn't detect overflows if the high 64-bit
of the dividend were equal to the 64-bit divisor. In that case,
64 bits wouldn't be enough to hold the quotient.
Signed-off-by: Luis Pires
---
util/host-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --
patch series.
Based-on: 20210823150235.35759-1-luis.pi...@eldorado.org.br
(target/ppc: fix setting of CR flags in bcdcfsq)
--
Luis Pires
Instituto de Pesquisas ELDORADO
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
Bruno Larsen (1):
target/ppc: Move REQUIR
all zero.
This would happen for source values of +/-10^31, +/-10^32, etc.
The new implementation fixes this and also skips the result calculation
altogether in case of src overflow.
Signed-off-by: Luis Pires
---
target/ppc/int_helper.c | 61 -
1 file
1 - 100 of 131 matches
Mail list logo