From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Jim Wilson Cc: Joern Rennecke , egcs@cygnus.com Subject: Re: Applying FUNCTION_ARG_PADDING to register arguments Date: Fri, 24 Oct 1997 07:43:00 -0000 Message-id: <11054.877704316@hurl.cygnus.com> References: <199710240016.RAA27996@cygnus.com> X-SW-Source: 1997-10/msg01020.html In message < 199710240016.RAA27996@cygnus.com >you write: > While tracking down a varargs bug, I found that calls.c doesn't respect > FUNCTION_ARG_PADDING for register arguments. I think that is a bug. > > I agree. However, the problem is not quite this simple to fix, because adding > code that uses FUNCTION_ARG_PADDING may break the compiler for other targets > if FUNCTION_ARG_PADDING happens to be defined wrong for this case. This > should at least be checked. This particular code is used for the PA and > Irix6 ports. I suggest you test them with your patch. > > The irix6 port has a related problem. I wrote up a description of > this once so I could discuss the problem with Kenner, but never had time > to finish the work I started. My message follows. I don't claim that > everything in it is correct, but there might be some useful info in it. There is a long standing ABI bug on the PA with regards to padding of structs. If I remember right, when a small struct is passed in a reg it is incorrectly justified. I believe this can be triggered by setting up a varargs/stdarg call with a small structs as unnamed args. If you compile the caller with gcc and the callee with HP C, then they'll disagree on the value of the parameters (similarly if you switch compiler for caller/callee). Jeff