[PATCH] i386: Assembly Implementation cleanup
H.J. Lu
hjl.tools@gmail.com
Wed Aug 12 15:06:00 GMT 2015
On Wed, Aug 12, 2015 at 8:01 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 08/12/2015 02:44 PM, H.J. Lu wrote:
>
>> Is there a way to truly inline syscall with 6 arguments, not by calling
>> __libc_do_syscall?
>
> Yes, newer GCC versions are able to spill %ebx just by writing
> appropriate constraints.
>
> Test case:
>
> int
> doit(int v)
> {
> int r;
> __asm__ ("MAGIC"
> : "=r" (r)
> : "b" (v));
> return r;
> }
>
> Compile with “-m32 -fpic -O2”.
>
I am working on it now.
--
H.J.
More information about the Libc-alpha
mailing list