|Gnu C compiler RTL question email@example.com (1998-09-13)|
|Re: Gnu C compiler RTL question firstname.lastname@example.org (Timothy Kong) (1998-09-18)|
|Re: Gnu C compiler RTL question email@example.com (1998-09-18)|
|Re: Gnu C compiler RTL question firstname.lastname@example.org (1998-09-18)|
|From:||email@example.com (Alan Lehotsky)|
|Date:||18 Sep 1998 23:04:29 -0400|
|Organization:||Quality Software Management|
>>>I read somewhere that the RTL is independent of the machine description, but
>>>looking at some compiled code shows that it does depend on the registers used
>>>as the stack and frame pointers.
>>>Are thes the only instances where this occurs??
GCC RTL is only independent of the machine description in principle.
e.g., RTL can describe a wide variety of architectures. The
machine description tailors RTL to a specific architecture by
providing code generation sequences for patterns (such as
adding integers, conditional tests, etc.). In addition, the
implementer of a port provides information on how to pass parameters
and how to allocate stack frames, etc.
The impressive thing about GCC and RTL is that all the machine
dependencies are segregated into about 6 files
plus a couple of make file fragments and shell scripts for configuration.
RTL is simple enough to provide generalized patterns and rich
enough to describe very complex code sequences. For example,
the code below show the multiply-and-accumulate instruction
for the SHARC DSP in a form that the compiler can use to
recognize opportunities to emit these instructions.
[(set (match_operand:SI 0 "mr_operand" "+f")
(plus:SI (match_dup 0)
(mult:SI (match_operand:SI 1 "datareg_operand" "d")
(match_operand:SI 2 "datareg_operand" "d"))))]
[(set (attr "type") (const_string "compute"))])
-- Al Lehotsky
Quality Software Management
Process Improvement | Management Consulting | Compiler Implementation
Return to the
Search the comp.compilers archives again.