This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]


On Fri, 21 Aug 2015, Andreas Schwab wrote:

> Joseph Myers <> writes:
> > I suspect the patch would also better be split up into the most mechanical 
> > changes that don't change generated code at all, and the less obvious 
> > pieces needing more careful review.
> Especially nothing should be committed until the whole series is aggreed
> upon.

I don't think that's a good general principle for patch series - a patch 
may well be good on its own merits independent of subsequent patches based 
on it.  But in the case of patch 1/6 here, I agree it only makes sense if 
subsequent patches are agreed.

Specifically, I don't see any need for either of the new macros.  So I 
think the whole basis of this first patch is flawed, since its 
justification is for use in the subsequent patches.

Instead of having two new macros, I think the i386 INLINE_SYSCALL could be 
made to use __syscall_error by making its contents look like 
(appropriately formatted):

unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args);
__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (resultvar, )) ? 
__syscall_error (resultvar) : resultvar;

That's it.  Now, maybe

return ({ a ? tailcallable () : b; });

doesn't produce a tail call.  But if it doesn't, that should be addressed 
in GCC, not through complicated macros in glibc.  A transformation from 
"return a ? tailcallable () : b;" to "if (a) return tailcallable (); else 
return b;" would seem reasonable if it improves the code.

Joseph S. Myers

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