This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Abstracting pointer arithmetic
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Abstracting pointer arithmetic
- From: Alan Lehotsky <lehotsky at tiac dot net>
- Date: Mon, 29 Jan 2001 14:40:33 -0500
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, lars dot spam at nocrew dot org,gcc at gcc dot gnu dot org
- References: <10101291312.AA22492@vlsi1.ultra.nyu.edu><20010129190612.K5350@daikokuya.demon.co.uk>
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?
>
>Neil.
--
------------------------------------------------------------------------
Quality Software Management
http://www.tiac.net/users/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