From patchwork Tue Mar 18 03:36:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Stump X-Patchwork-Id: 331281 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2A2532C009C for ; Tue, 18 Mar 2014 14:36:31 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; q=dns; s=default; b=yVI9cHGJz5ZO7qWjmKjnhiqnh8 QSyJQZtlUNcVSAWjlTq6hRodogu5eVtQtIhhowU/7dM4H/Hn+egr4j+mqjF3bS1p k6734ZP0ul8P2p6lwz/fEZjK6+9y/Q01tnz76X1XRvt+9pSRfg+S+PYu7zsow0bm oHi9NqU1WRzB2wEiU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; s=default; bh=+ttG05YC6Z1zMUcpZRcd30zaj3Q=; b= CreRXkX5DK/r8MAoJ38KXikZzunP7cUh/YG3dkpGskxLEpTlI50OnJyoXTShW+vg jXiHRjeoqLBzuXZsE+6HAKUYNGDYm+Xhi77H4knPF0a+hzlAM4P69nhouJNNYDhr rEZ+jCyuYzC3aBf9dPiFzJgIj1Fox2itWuNIQ9PzbtY= Received: (qmail 19468 invoked by alias); 18 Mar 2014 03:36:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 19456 invoked by uid 89); 18 Mar 2014 03:36:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: qmta06.emeryville.ca.mail.comcast.net Received: from qmta06.emeryville.ca.mail.comcast.net (HELO qmta06.emeryville.ca.mail.comcast.net) (76.96.30.56) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Mar 2014 03:36:21 +0000 Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta06.emeryville.ca.mail.comcast.net with comcast id erKb1n0031HpZEsA6rcKUm; Tue, 18 Mar 2014 03:36:19 +0000 Received: from up.mrs.kithrup.com ([24.4.193.248]) by omta14.emeryville.ca.mail.comcast.net with comcast id ercJ1n00W5N1HX48arcKhg; Tue, 18 Mar 2014 03:36:19 +0000 From: Mike Stump Subject: extending constants in rtl Message-Id: Date: Mon, 17 Mar 2014 20:36:04 -0700 To: gcc-patches List Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) X-IsSubscribed: yes So, to support things like this: (define_constants (C1_TEMP_REGNUM PROLOGUE_SCRATCH_1) (C1_TEMP2_REGNUM PROLOGUE_SCRATCH_2) I need the rtl reader to do less checking. We we turn off int validation, this then works, and we get: #define C1_TEMP_REGNUM PROLOGUE_SCRATCH_1 in insn-constants.h, which is what I wanted. The problem is that I choose different scratch register based upon the cpu and this is then used in a clobber in the rtl of a define_insn. I’d be happy to do this some other way, but, I didn’t see a way to do this, otherwise. Absent a better solution, I’d like to pursue this. The only question I have, remove the checking, or allow the target to explain that we don’t want the checking? diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index c198b5b..ceef96c 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -807,8 +807,12 @@ validate_const_int (const char *string) valid = 0; break; } +#if 0 + /* In order to support defining the md constants in terms of CPP constants from tm.h, we + can't check this. */ if (!valid) fatal_with_file_and_line ("invalid decimal constant \"%s\"\n", string); +#endif } static void