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 dependency


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


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