This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: use R2 as local reg on Darwin
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: Patch: use R2 as local reg on Darwin
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Fri, 07 Sep 2001 22:38:52 -0400
- cc: Stan Shebs <shebs at apple dot com>, dalej at apple dot com, gcc-patches at gcc dot gnu dot org
>>>>> Michael Meissner writes:
Michael> Well actually both have their advantages and disadvantages. I tend to think
Michael> the TOC scheme isn't as optimal for 32-bit non-library code as System V.4's
Michael> method of constructing the address inline, particularly on 604/750 type CPUs
Michael> that have more than 1 integer unit, since it involves a memory access to load
Michael> the address instead of 2 integer operations. The calling sequence for
Michael> unprototyped functions involving floating point values can always slow things
Michael> down. The requirement that the 224 words above the stack pointer be valid is
Michael> also somewhat unusual and definately burned some embedded folk before the
Michael> switch over to System V.4/eabi calling sequences.
Imposing PIC code for 32-bit targets is more questionable. If one
does expect to access *some* PIC code, then it really is a trade-off of
which type of code one wants to advantage.
Calculating the GOT base by jumping to the GOT table is a bad
match for PowerPC because it requires the GOT table to be located close
enough for a PowerPC relative branch instruction. This requires the data
section to be in the same segment as the text section, undermining
efficiencies of the PowerPC segments that the OS otherwise could use.
This also limits the size of the code and severely hampers the use of
large address spaces when moving to 64-bit architecture.
AIX function arguments are a little too simplistic and wasteful,
but SVR4 packing of arguments is too complex. An efficient design
somewhere between the two would have been nice.
The large area for leaf frames has its good points and bad
points. It definitely can be confusing.
David