From patchwork Tue Feb 11 00:40:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 11374479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7792D1395 for ; Tue, 11 Feb 2020 00:59:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E6992072C for ; Tue, 11 Feb 2020 00:59:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="WGzJJ3L5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E6992072C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:41794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1Jtn-0005cc-Cl for patchwork-qemu-devel@patchwork.kernel.org; Mon, 10 Feb 2020 19:59:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33533) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1Jce-00029E-7G for qemu-devel@nongnu.org; Mon, 10 Feb 2020 19:41:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1Jcd-0000ql-1L for qemu-devel@nongnu.org; Mon, 10 Feb 2020 19:41:52 -0500 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:59197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1Jcc-0004rC-Le for qemu-devel@nongnu.org; Mon, 10 Feb 2020 19:41:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1581381710; x=1612917710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uGi5ah7caznBd1QQl82rntMxjaJe5m7EArAf9o9u7nc=; b=WGzJJ3L5dMymjVHLOjgIEZvlyDZw+hTLSVOod58pzCtk2UvMQYEy4Ewd R/++NKC9VFPxKhtv/Z/aKFfTYtg6Ne2yXcOEDttKd7Xx0g9w/LfPZnzAg ERoJGspnKKnMK+MPQL1hizPEdNdhtQWV9lIGdOg1VjfS9i+goUxSYmlWD I=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 10 Feb 2020 16:41:02 -0800 Received: from vu-tsimpson-aus.qualcomm.com (HELO vu-tsimpson1-aus.qualcomm.com) ([10.222.150.1]) by ironmsg02-sd.qualcomm.com with ESMTP; 10 Feb 2020 16:41:01 -0800 Received: by vu-tsimpson1-aus.qualcomm.com (Postfix, from userid 47164) id 8AE191B5F; Mon, 10 Feb 2020 18:41:01 -0600 (CST) From: Taylor Simpson To: qemu-devel@nongnu.org Subject: [RFC PATCH 45/66] Hexagon TCG generation - step 08 Date: Mon, 10 Feb 2020 18:40:23 -0600 Message-Id: <1581381644-13678-46-git-send-email-tsimpson@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581381644-13678-1-git-send-email-tsimpson@quicinc.com> References: <1581381644-13678-1-git-send-email-tsimpson@quicinc.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 199.106.114.39 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: riku.voipio@iki.fi, richard.henderson@linaro.org, laurent@vivier.eu, Taylor Simpson , philmd@redhat.com, aleksandar.m.mail@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Override mathematical operations with more than one definition Signed-off-by: Taylor Simpson --- target/hexagon/helper_overrides.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/target/hexagon/helper_overrides.h b/target/hexagon/helper_overrides.h index c7550d5..e544dd5 100644 --- a/target/hexagon/helper_overrides.h +++ b/target/hexagon/helper_overrides.h @@ -1200,4 +1200,34 @@ #define fWRAP_SL2_return_fnew(GENHLPR, SHORTCODE) \ fWRAP_COND_RETURN_SUBINSN(fLSBNEW0NOT) +/* + * Mathematical operations with more than one definition require + * special handling + */ +/* + * Approximate reciprocal + * r3,p1 = sfrecipa(r0, r1) + */ +#define fWRAP_F2_sfrecipa(GENHLPR, SHORTCODE) \ + do { \ + gen_helper_sfrecipa_val(RdV, cpu_env, RsV, RtV); \ + gen_helper_sfrecipa_pred(PeV, cpu_env, RsV, RtV); \ + } while (0) + +/* + * Approximation of the reciprocal square root + * r1,p0 = sfinvsqrta(r0) + */ +#define fWRAP_F2_sfinvsqrta(GENHLPR, SHORTCODE) \ + do { \ + gen_helper_sfinvsqrta_val(RdV, cpu_env, RsV); \ + gen_helper_sfinvsqrta_pred(PeV, cpu_env, RsV); \ + } while (0) + +#define fWRAP_A5_ACS(GENHLPR, SHORTCODE) \ + do { \ + gen_helper_vacsh_val(RxxV, cpu_env, RxxV, RssV, RttV); \ + gen_helper_vacsh_pred(PeV, cpu_env, RxxV, RssV, RttV); \ + } while (0) + #endif