rtl semantics
Ian Lance Taylor
ian@airs.com
Fri Dec 31 15:55:00 GMT 2004
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
More information about the Gcc
mailing list