From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21532 invoked by alias); 25 May 2007 14:49:24 -0000 Received: (qmail 21502 invoked by uid 22791); 25 May 2007 14:49:17 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 25 May 2007 14:49:14 +0000 Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id l4PEmtMn031206; Fri, 25 May 2007 07:48:58 -0700 Received: from smtp.corp.google.com (spacemonkey2.corp.google.com [192.168.120.114]) by zps35.corp.google.com with ESMTP id l4PEmZIN015177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2007 07:48:35 -0700 Received: from localhost.localdomain.google.com (182.sub-70-212-252.myvzw.com [70.212.252.182]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id l4PEmVjp022377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2007 07:48:33 -0700 To: Nick Maclaren Cc: gcc-help@gcc.gnu.org Subject: Re: RTL obscurities References: From: Ian Lance Taylor Date: Fri, 25 May 2007 16:46:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg00259.txt.bz2 Nick Maclaren writes: > What I need to do is to insert the following: > > extern void *__limit; > extern void __failure (void); > if (%SP < __limit) __failure(); This is similar to what probe_stack_range in explow.c does, so that a look at that function. It's obviously easier to answer more detailed questions. The general flow of RTL is: * Define insn FOO in .md file * Generate it using emit_insn (gen_FOO (operands)). * Use standard names for, e.g., addition insns so that gcc knows which ones to use when generating code. There are literally thousands of example of RTL generation in the gcc code base. Ian