This is the mail archive of the 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]

Re: Abstracting pointer arithmetic

At 7:06 PM +0000 1/29/01, Neil Booth wrote:

>Richard Kenner wrote:-
>>  For *those* machines you can define Pmode as a different class.  I thought
>>  you were proposing doing it for *all* machines in order to support those.
>I'd like to add my two cents here, though I have no real understanding
>of the issues in the guts of the compiler.
>Am I right in thinking that in GCC we do far too much on an ad-hoc
>basis, with lots of special cases with if statements, and / or mega
>switch statements?

	Well, there are some gigantic switches, but it's not 
special-cased by architecture,
	but rather by gross features like BIG_ENDIAN vs. LITTLE_ENDIAN 
and some heuristics
	driven by MACRO functions (like GO_IF_LEGITIMATE_ADDRESS, for example)

>   I would have thought that many of these things
>would be better and more robustly done through some kind of interface,
>say a whole bunch of virtual functions accessed through function
>pointers, and overridable by those architectures to which the general
>methodology does not apply?

	Actually that's (in effect) what the named RTL patterns are;  they're the
	methods associated with virtual functions for a target-machine object.

	It's just that the binding occurs at compile time (or at the time 
all tine genXXXXX
	programs run over the .md file)

>Or am I way off base here without a clue?


		    Quality Software Management
			(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]