OSDN Git Service

i386/bits/syscalls.h: generate better code using more restrictive asm constraints
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 6 Apr 2010 03:29:26 +0000 (05:29 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 6 Apr 2010 03:29:26 +0000 (05:29 +0200)
commitd82f29cd593e371acb3a6f11656543cf2e6e2421
tree433df3e8a590282fa9cbc80409412d755b8b834c
parenteefaf06888e3dcbc410b4cc2d231035f4400c7ac
i386/bits/syscalls.h: generate better code using more restrictive asm constraints

Example: time() doesn't push/pop two registers now, and is smaller:

    <__GI_time>:
    -57                     push   %edi
    -8b 7c 24 08            mov    0x8(%esp),%edi
    -53                     push   %ebx
    -89 fb                  mov    %edi,%ebx
    +8b 4c 24 04            mov    0x4(%esp),%ecx
    +87 cb                  xchg   %ecx,%ebx
     b8 0d 00 00 00         mov    $0xd,%eax
     cd 80                  int    $0x80
    -5b                     pop    %ebx
    -5f                     pop    %edi
    +87 cb                  xchg   %ecx,%ebx
     c3                     ret

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libc/sysdeps/linux/i386/bits/syscalls.h