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

Re: Serious PPC stdarg problem with 2.95.2


Hello Franz!

On 23-Feb-00, you wrote:
> At 18:35 23.02.00 , Gunther Nikl wrote:
>>>> several really bogus code parts. (Look for !!!!)
>>>> 
>>> Maybe because it doesn't happen? :-)
>>> 
>>> Do you have any modification in your sources? On powerpc-linux-gnu this
>>> works just fine as the appended source shows.
>> 
>> Yes, there is a change: structure elements are only wordaligned...
>> This clashes with the way gcc creates the va_list structure. The
>> question is should gcc obey a requested structere layout?
>> The problem wasn't visible before because the va_list structure was
>> created in "va-ppc.h" thus getting the requested alignment.
>
> What do you mean with word-aligned? The minimum alignment for the PPC SYSV
> ABI is 32bit anyway. Did you change it to be half-word (16-bit) aligned
> (which sounds like a very bad idea)?

 I knew should write the bit count ;-) Yes, the compiler mentioned included
 a change that aligns structure elements on a 16 bit boundary only. That
 may violate the PPC SYSV ABI and may cause a speed penalty.

>This is an ABI change and if you do that YOU have to make sure all the
>corresponding places in the compiler are changed as well.

 I have to disagree with you on this topic. The compilers behavoiur was
 changed through a *well defined* and *documented* way namely with
 ADJUST_FIELD_ALIGN. I think using hooks provided in the GCC sources
 to alter the compiler behavoir is legal and GCC should respect this.

>A lot of routines in the backend are tailored to a specific ABI convention.

 Well, that is certainly true but in this particular case this doesn't
 apply. Structure layout does not belong to the backend, thats why its
 done in stor-layout.c and in the developer sources rs6000.c no longer
 carves the structure itself.

 Franz, I only wanted to explain what happened and that there is no "real"
 bug in the PPC V.4 stdarg support. For our particular environment it
 didn't work because GCC took a shortcut.

 Gunther


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