From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64180 invoked by alias); 4 Dec 2015 13:42:15 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 64170 invoked by uid 89); 4 Dec 2015 13:42:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 04 Dec 2015 13:42:13 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BC7C0ADC3 for ; Fri, 4 Dec 2015 13:42:10 +0000 (UTC) To: GCC Patches From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [HSA] Fix emission of internal functions Message-ID: <56619832.60902@suse.cz> Date: Fri, 04 Dec 2015 13:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090705050404020801030600" X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00558.txt.bz2 This is a multi-part message in MIME format. --------------090705050404020801030600 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 180 Hello. Following patch handles just floating pointer internal functions and for the rest if displays warning message. Patch has been installed to the HSA branch. Thanks, Martin --------------090705050404020801030600 Content-Type: text/x-patch; name="0001-HSA-fix-emission-of-non-math-internal-functions.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-HSA-fix-emission-of-non-math-internal-functions.patch" Content-length: 1502 >From 5c6581d913c754e4e0a197e073bfa3c17c20b31f Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 4 Dec 2015 09:56:11 +0100 Subject: [PATCH 1/3] HSA: fix emission of non-math internal functions gcc/ChangeLog: 2015-12-04 Martin Liska * hsa-gen.c (gen_hsa_insn_for_internal_fn_call): Explicitly enumerate all internal functions that can be emitted as function call instruction. --- gcc/hsa-gen.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c index 3fbafb5..85ba148 100644 --- a/gcc/hsa-gen.c +++ b/gcc/hsa-gen.c @@ -4974,8 +4974,34 @@ gen_hsa_insn_for_internal_fn_call (gcall *stmt, hsa_bb *hbb) gen_hsa_popcount (stmt, hbb); break; - default: + case IFN_ACOS: + case IFN_ASIN: + case IFN_ATAN: + case IFN_EXP: + case IFN_EXP10: + case IFN_EXPM1: + case IFN_LOG: + case IFN_LOG10: + case IFN_LOG1P: + case IFN_LOGB: + case IFN_SIGNIFICAND: + case IFN_TAN: + case IFN_NEARBYINT: + case IFN_ROUND: + case IFN_ATAN2: + case IFN_COPYSIGN: + case IFN_FMOD: + case IFN_POW: + case IFN_REMAINDER: + case IFN_SCALB: + case IFN_FMIN: + case IFN_FMAX: gen_hsa_insns_for_call_of_internal_fn (stmt, hbb); + + default: + HSA_SORRY_ATV (gimple_location (stmt), + "support for HSA does not implement internal function: %s", + internal_fn_name (fn)); break; } } -- 2.6.3 --------------090705050404020801030600--