[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/34] target-ppc: use the softfloat min/max functio
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 07/34] target-ppc: use the softfloat min/max functions |
Date: |
Thu, 4 Oct 2012 15:56:29 +0200 |
From: Aurelien Jarno <address@hidden>
Use the new softfloat float32_min() and float32_max() to implement the
vminfp and vmaxfp instructions. As a bonus we can get rid of the call to
the HANDLE_NAN2 macro, as the NaN handling is directly done at the
softfloat level.
Signed-off-by: Aurelien Jarno <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/int_helper.c | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
index 5b2a3c8..6141243 100644
--- a/target-ppc/int_helper.c
+++ b/target-ppc/int_helper.c
@@ -414,6 +414,8 @@ VARITH(uwm, u32)
}
VARITHFP(addfp, float32_add)
VARITHFP(subfp, float32_sub)
+VARITHFP(minfp, float32_min)
+VARITHFP(maxfp, float32_max)
#undef VARITHFP
#define VARITHSAT_CASE(type, op, cvt, element) \
@@ -728,27 +730,6 @@ VMINMAX(uw, u32)
#undef VMINMAX_DO
#undef VMINMAX
-#define VMINMAXFP(suffix, rT, rF) \
- void helper_v##suffix(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, \
- ppc_avr_t *b) \
- { \
- int i; \
- \
- for (i = 0; i < ARRAY_SIZE(r->f); i++) { \
- HANDLE_NAN2(r->f[i], a->f[i], b->f[i]) { \
- if (float32_lt_quiet(a->f[i], b->f[i], \
- &env->vec_status)) { \
- r->f[i] = rT->f[i]; \
- } else { \
- r->f[i] = rF->f[i]; \
- } \
- } \
- } \
- }
-VMINMAXFP(minfp, a, b)
-VMINMAXFP(maxfp, b, a)
-#undef VMINMAXFP
-
void helper_vmladduhm(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
{
int i;
--
1.6.0.2
- [Qemu-devel] [PULL 00/34] ppc patch queue 2012-10-04, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 07/34] target-ppc: use the softfloat min/max functions,
Alexander Graf <=
- [Qemu-devel] [PATCH 02/34] MAINTAINERS: Document e500 machines and devices, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 01/34] MAINTAINERS: Document sPAPR (pSeries) machine, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 03/34] MAINTAINERS: Downgrade ppc405 to Odd Fixes, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 05/34] MAINTAINERS: Document virtex_ml507 machine, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 04/34] MAINTAINERS: Document Bamboo machine and ppc4xx devices, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 06/34] target-ppc: simplify NaN propagation for vector functions, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 08/34] target-ppc: use the softfloat float32_muladd function, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 09/34] target-ppc: get rid of the HANDLE_NAN{1, 2, 3} macros, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 16/34] pseries: Fix XICS reset, Alexander Graf, 2012/10/04
- [Qemu-devel] [PATCH 11/34] pseries: Fix and cleanup CPU initialization and reset, Alexander Graf, 2012/10/04