Subject: Re: CVS commit: syssrc/sys/arch/powerpc/include
To: Matt Thomas <matt@3am-software.com>
From: Noriyuki Soda <soda@sra.co.jp>
List: tech-toolchain
Date: 08/08/2002 03:07:56
>>>>> On Wed, 07 Aug 2002 10:54:15 -0700,
Matt Thomas <matt@3am-software.com> said:
> Note that by calling vprintf twice, the program iterates twice
> through the va_list. If the va_list wasn't being treated as a value
> by vprintf, the second call the vprintf would have gotten a trashed
> va_list.
If the libc is compiled by your modified ansi.h, that's true.
But if the libc is compiled by original ansi.h, that's not true,
because vprintf() copies the va_list argument internally
(to pass it to vfprintf()).
Is the libc compiled by your modified ansi.h?
> The assembler output is reasonably close. I looked at it.
Could you post the both output of the assembler?
Perhaps someone can confirm it. (not me, because I don't know ppc asm ;))
> Anyway, SVR4 ABI passes large structures (like va_list) by reference
> anyways. So in either case a pointer is going to be passed.
But that doesn't mean passing a value and passing an address of
the value is ABI compatible. Because the latter modifies local
variable of caller function.
--
soda