This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: mips va_arg question
- From: Mile Davidovic <mdavidyu at yahoo dot com>
- To: Dave Korn <dk at artimi dot com>, 'Richard Sandiford' <rsandifo at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 12 Aug 2004 06:02:05 -0700 (PDT)
- Subject: RE: mips va_arg question
I am so sorry for stupid question, I did not know that
SP has to be multiple of 8. I have a large peace of SW
with underlying RTOS behind and problem with calling
function with variable arguments when one of
parameters is double.
In any case, I am very thank for all your effort.
--- Dave Korn <dk@artimi.com> wrote:
> > -----Original Message-----
> > From: gcc-owner On Behalf Of Richard Sandiford
> > Sent: 12 August 2004 13:34
> > To: Mile Davidovic
> >
> > Mile Davidovic writes:
> > > Passing of double to function with variable
> number of
> > > arguments is over stack, and va_arg inside of
> function
> > > with variable number of arguments suppose that
> sp
> > > could be divided by 8.
> >
> > Yes. The ABIs say that sp must be divisible by
> 8[*]. If it isn't
> > for you then something is very wrong. Where's the
> misaligned sp
> > coming from?
>
> From his own inline asm. That doesn't even
> mention sp in the clobber
> list.
>
> > -----Original Message-----
> > From: gcc-owner On Behalf Of Mile Davidovic
> > Sent: 12 August 2004 12:02
>
> > Here is small sample:
> > test(1, 2, 3, 4.56,5,6);
> > asm("addiu $29, $29, -4"); // SP isn't multiple
> of 8
> > test(1, 2, 3, 4.56,5,6);
>
> Poor little compiler, that's such a mean and nasty
> trick to play on it!
>
> cheers,
> DaveK
> --
> Can't think of a witty .sigline today....
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail