From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCVeN-00058I-T1 for qemu-devel@nongnu.org; Wed, 20 Apr 2011 07:32:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCVeL-0001cD-SR for qemu-devel@nongnu.org; Wed, 20 Apr 2011 07:32:51 -0400 Received: from hall.aurel32.net ([88.191.126.93]:50802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCVeL-0001br-Ls for qemu-devel@nongnu.org; Wed, 20 Apr 2011 07:32:49 -0400 From: Aurelien Jarno Date: Wed, 20 Apr 2011 13:32:33 +0200 Message-Id: <1303299154-14373-2-git-send-email-aurelien@aurel32.net> In-Reply-To: <1303299154-14373-1-git-send-email-aurelien@aurel32.net> References: <1303299154-14373-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH v2 2/3] target-ppc: use softfloat min/max functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf , Aurelien Jarno Use the new softfloat float32_min() and float32_max() to implement the vminfp and vmaxfp instructions. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/op_helper.c | 20 ++------------------ 1 files changed, 2 insertions(+), 18 deletions(-) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index f2c80a3..f1cdef9 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -2092,6 +2092,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) \ @@ -2369,24 +2371,6 @@ VMINMAX(uw, u32) #undef VMINMAX_DO #undef VMINMAX -#define VMINMAXFP(suffix, rT, rF) \ - void helper_v##suffix (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.7.2.3