This is the mail archive of the libc-alpha@sourceware.org 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]

Re: Support six-argument syscalls from C for 32-bit x86, use generic lowlevellock-futex.h (bug 18138)


On Mon, 23 Mar 2015, Florian Weimer wrote:

> On 03/21/2015 01:28 AM, Joseph Myers wrote:
> > +    asm volatile (							\
> > +    "movl %1, %%eax\n\t"						\
> > +    "call __libc_do_syscall"						\
> > +    : "=a" (resultvar)							\
> > +    : "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \
> > +    : "memory", "cc")
> 
> I don't think the constraints express that you destroy %eax early, but
> you might get away with that in this particular case because it is
> impossible to allocate the register differently.

I'm following the existing macros (which do much the same) as closely as 
possible.  As noted, the point at which %eax is written is irrelevant, 
since every operand is either an immediate constant or required to be in a 
particular register.

-- 
Joseph S. Myers
joseph@codesourcery.com


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