This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] mips/o32: fix internal_syscall5/6/7
On Wed, 16 Aug 2017, Maciej W. Rozycki wrote:
> Or am I missing anything here? E.g. is the compiler allowed to spill
> random data to the stack at any time even in the absence of a matching
> variable declaration? Or is it allowed to allocate space for a non-VLA
> variable that has been declared outside the block concerned, but the
> lifespan of which is contained within the block in this stack space rather
> than in the local frame?
Yes, it's allowed to do both of those.
> If the answer to any of these questions is "yes", then would factoring
> out the syscall `asm' along with the associated VLA declaration to a
> helper `always_inline' function help or would it not?
I don't think that would help. An asm can never make assumptions about
which parts of the stack are used for what, only use its operands.
> I mean it is a tiny optimisation, but some syscalls are frequently
> called, so if we can avoid a waste of resources, then why not?
Are any 5/6/7-argument syscalls frequently called?
--
Joseph S. Myers
joseph@codesourcery.com