This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: rtl semantics
- From: Ian Lance Taylor <ian at airs dot com>
- To: Russell Shaw <rjshaw at netspace dot net dot au>
- Cc: gcc at gcc dot gnu dot org
- Date: 31 Dec 2004 10:30:48 -0500
- Subject: Re: rtl semantics
- References: <41D5709A.5010804@netspace.net.au>
Russell Shaw <rjshaw@netspace.net.au> writes:
> I just read all the gcc internals manual.
> I have trouble with the contextual polymorphic
> nature of rtl objects.
>
> In h8300.md, there is:
>
> (define_attr "cpu" "h8300,h8300h"
> (const (symbol_ref "cpu_type")))
>
> yet in gccint.info, const should have a machine mode: (const:M EXP)
>
> Do rtl keywords have a variable meaning, depending on the context
> where they're used? Is there other languages similar to rtl i could
> learn from? (scheme?)
The define_attr construct is not quite RTL. It does not actually
describe a machine instruction, and thus does not require a mode. It
is described here:
http://gcc.gnu.org/onlinedocs/gccint/Defining-Attributes.html#Defining-Attributes
The const attribute in define_attr is described here:
http://gcc.gnu.org/onlinedocs/gccint/Constant-Attributes.html#Constant-Attributes
Ian