* rtl dependency
@ 2002-02-26 7:07 Danish Samad
2002-02-26 7:32 ` Alan Lehotsky
0 siblings, 1 reply; 2+ messages in thread
From: Danish Samad @ 2002-02-26 7:07 UTC (permalink / raw)
To: gcc, raufh, durdana
hello,
I have observed that different cross compilers
produce different RTL for the same peice of code.
Does this mean that unoptimized RTL generated is
dependent on target description macros if yes then
which macros? or is it only dependent on machine
descriptions? Further what would I have to do to
produce load store RTL instructions for a
initialization such as i=4;
thanking in advance,
danish
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: rtl dependency
2002-02-26 7:07 rtl dependency Danish Samad
@ 2002-02-26 7:32 ` Alan Lehotsky
0 siblings, 0 replies; 2+ messages in thread
From: Alan Lehotsky @ 2002-02-26 7:32 UTC (permalink / raw)
To: Danish Samad; +Cc: gcc, raufh, durdana
At 5:59 AM -0800 2/26/02, Danish Samad wrote:
>hello,
>
> I have observed that different cross compilers
>produce different RTL for the same peice of code.
Yes.
>Does this mean that unoptimized RTL generated is
>dependent on target description macros if yes then
>which macros?
A great many of them! Pretty much all the things described in the sections of the porting guide
that discuss Register Characteristics, Passing Arguments/ Stack Layout, Storage Layout, and Addressing
Modes.
> or is it only dependent on machine
>descriptions?
It's driven by the named patterns - like "movsi", "addsi3", etc. that the tree conversion
code in expr.c and optabs.c knows about - but the target macros influence heavily what happens.
>Further what would I have to do to
>produce load store RTL instructions for a
>initialization such as i=4;
Look at an existing load/store machine - there are a bunch of 'em.
Typically what you do is write a "movsi" define_expand pattern that checks to see if at least
one of the operands is a REG and forces the OTHER operand to a register. E.g., if you tried to
do a memory-to-memory move, you'd force the source to a register and then move that
register to memory.
--
------------------------------------------------------------------------
Quality Software Management
http://home.earthlink.net/~qsmgmt
apl@alum.mit.edu
(978)287-0435 Voice
(978)808-6836 Cell
(978)287-0436 Fax
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-26 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-26 7:07 rtl dependency Danish Samad
2002-02-26 7:32 ` Alan Lehotsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).