This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rtl semantics


Ian Lance Taylor wrote:
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

Are the templates in <machine>.md real RTL, or only templates used to generate RTL? Is "RTL" a textual language, or just some C struct?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]