This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Support six-argument syscalls from C for 32-bit x86, use generic lowlevellock-futex.h (bug 18138)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>, <roland at hack dot frob dot com>, <triegel at redhat dot com>, <carlos at redhat dot com>
- Date: Mon, 23 Mar 2015 21:50:07 +0000
- Subject: Re: Support six-argument syscalls from C for 32-bit x86, use generic lowlevellock-futex.h (bug 18138)
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1503210026500 dot 5144 at digraph dot polyomino dot org dot uk> <551063D3 dot 4070306 at redhat dot com>
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