From patchwork Mon Apr 18 19:23:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 91836 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BD1311007D9 for ; Tue, 19 Apr 2011 05:23:56 +1000 (EST) Received: from localhost ([::1]:38733 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBu37-000234-AC for incoming@patchwork.ozlabs.org; Mon, 18 Apr 2011 15:23:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBu2s-0001zy-Br for qemu-devel@nongnu.org; Mon, 18 Apr 2011 15:23:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QBu2q-00064C-2b for qemu-devel@nongnu.org; Mon, 18 Apr 2011 15:23:38 -0400 Received: from hall.aurel32.net ([88.191.126.93]:60965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBu2p-000648-US for qemu-devel@nongnu.org; Mon, 18 Apr 2011 15:23:36 -0400 Received: from [2001:470:d4ed:0:5e26:aff:fe2b:6f5b] (helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QBu2p-000616-Bi; Mon, 18 Apr 2011 21:23:35 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.72) (envelope-from ) id 1QBu2o-00081g-AB; Mon, 18 Apr 2011 21:23:34 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Mon, 18 Apr 2011 21:23:30 +0200 Message-Id: <1303154610-30666-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.2.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: Alexander Graf , Aurelien Jarno Subject: [Qemu-devel] [PATCH] target-ppc: use softfloat min/max functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 9aa108e..9058d78 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -2369,22 +2369,16 @@ 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) \ +#define VMINMAXFP(suffix) \ + void helper_v##suffix##fp (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]; \ - } \ - } \ + r->f[i] = float32_##suffix(a->f[i], b->f[i], &env->vec_status); \ } \ } -VMINMAXFP(minfp, a, b) -VMINMAXFP(maxfp, b, a) +VMINMAXFP(min) +VMINMAXFP(max) #undef VMINMAXFP void helper_vmladduhm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)