From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16333 invoked by alias); 15 Jul 2013 15:23:57 -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 16324 invoked by uid 89); 15 Jul 2013 15:23:56 -0000 X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_40,KHOP_THREADED,RCVD_IN_DNSWL_MED,RCVD_IN_HOSTKARMA_W,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO e23smtp09.au.ibm.com) (202.81.31.142) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 15 Jul 2013 15:23:54 +0000 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Jul 2013 12:19:02 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp09.au.ibm.com (202.81.31.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 16 Jul 2013 12:19:01 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 4B7472CE8052 for ; Tue, 16 Jul 2013 01:23:26 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6FF8C1b51118292 for ; Tue, 16 Jul 2013 01:08:12 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6FFNPss003729 for ; Tue, 16 Jul 2013 01:23:25 +1000 Received: from [192.168.1.113] (vorma.rchland.ibm.com [9.10.86.174]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r6FFNMs7003661; Tue, 16 Jul 2013 01:23:23 +1000 Subject: Re: [PATCH, rs6000, libitm] Enable Hardware Transactional Memory (HTM) support on Power From: Peter Bergner To: David Edelsohn Cc: "gcc-patches@gcc.gnu.org" , Richard Henderson , Michael Meissner , Pat Haugen In-Reply-To: References: <1372734758.4736.149.camel@otta> Content-Type: text/plain; charset="UTF-8" Date: Mon, 15 Jul 2013 15:26:00 -0000 Message-ID: <1373901800.4538.122.camel@otta> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13071602-3568-0000-0000-000003ED9A44 X-SW-Source: 2013-07/txt/msg00566.txt.bz2 On Thu, 2013-07-04 at 12:02 -0400, David Edelsohn wrote: > The expanders in htm.md should not include constraint letters. That's the way I had the code originally, since they're not needed for expand, but I added them later to improve the error message when someone uses a builtin that takes an integer constant argument and uses a value out of range. Specifically, it is used by this part of the patch: + if (!(*insn_op->predicate) (op[nopnds], insn_op->mode)) + { + if (!strcmp (insn_op->constraint, "n")) + { + int arg_num = (nonvoid) ? nopnds : nopnds + 1; + if (!CONST_INT_P (op[nopnds])) + error ("argument %d must be an unsigned literal", arg_num); + else + error ("argument %d is an unsigned literal that is " + "out of range", arg_num); + return const0_rtx; + } + op[nopnds] = copy_to_mode_reg (insn_op->mode, op[nopnds]); + } If you want, I can remove the constraints and the extra error message. Just let me know what you want. Peter