This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] Support for spec predicate expressions
- From: Jason R Thorpe <thorpej at wasabisystems dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: DJ Delorie <dj at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 31 Oct 2002 13:33:40 -0800
- Subject: Re: [PATCH/RFC] Support for spec predicate expressions
- Organization: Wasabi Systems, Inc.
- References: <20021028120858.E19682@dhcp7.wlan.shagadelic.org> <200210282034.g9SKYdU20886@greed.delorie.com> <20021030084841.F24032@dhcp7.wlan.shagadelic.org> <20021030173603.GA1503@codesourcery.com>
On Wed, Oct 30, 2002 at 09:36:03AM -0800, Zack Weinberg wrote:
> I propose the syntax
>
> %:function(args)
>
> to return a string which is substituted, and
BTW, I was just thinking about this a little ... and it occurred to me
that a LOT of the ugliness of specs can be cleaned up by this. Really,
in a way that's similar to how the TARGET_*_CPP_BUILTINS were done, but
while still keeping them "in specs"...
For example, take a look at config/mips/mips.h, ASM_SPEC... note the
long, somewhat annoying string of stuff used to pass the ABI flag to
the assembler... That whole string of stuff could be replaced by a
single:
%:mips_asm_abi_flag()
which could emit the ABI flag to the assembler with the same precision
used to get CPP built-ins right (by switching on the mips_abi variable).
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>