diff options
| author | Elliott Hughes <enh@google.com> | 2013-02-06 17:08:15 -0800 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2013-02-06 17:08:15 -0800 |
| commit | 7582a9c119a4e4d0c306996b2513205889a9fb6c (patch) | |
| tree | 44c9126902c7477c5f260323a07a775725c22f55 /libc/tools | |
| parent | d32fdbaf03f688497adbec885e85c0a69f7a4542 (diff) | |
| download | bionic-7582a9c119a4e4d0c306996b2513205889a9fb6c.zip bionic-7582a9c119a4e4d0c306996b2513205889a9fb6c.tar.gz bionic-7582a9c119a4e4d0c306996b2513205889a9fb6c.tar.bz2 | |
Switch x86 syscall stubs over to the ENTER/END style of the ARM stubs.
Also update the x86 asm.h to support this; we need it for libm assembler
anyway.
Also clean up the _FBSDID hack in <sys/cdefs.h>.
Change-Id: Iababd977b8110ec022bf7c93f4d62ece47630e7c
Diffstat (limited to 'libc/tools')
| -rwxr-xr-x | libc/tools/gensyscalls.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py index a4e5679..a39b63b 100755 --- a/libc/tools/gensyscalls.py +++ b/libc/tools/gensyscalls.py @@ -51,14 +51,10 @@ def create_file( relpath ): # x86_header = """/* autogenerated by gensyscalls.py */ +#include <machine/asm.h> #include <sys/linux-syscalls.h> - .text - .type %(fname)s, @function - .globl %(fname)s - .align 4 - -%(fname)s: +ENTRY(%(fname)s) """ x86_registers = [ "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp" ] @@ -76,6 +72,7 @@ x86_call = """ movl $%(idname)s, %%eax """ x86_return = """ ret +END(%(fname)s) """ # ARM assembler templates for each syscall stub @@ -288,7 +285,7 @@ class State: for r in range(numparams): result += " popl " + x86_registers[numparams-r-1] + "\n" - result += x86_return + result += x86_return % t return result def x86_genstub_cid(self, fname, numparams, idname, cid): @@ -326,7 +323,7 @@ class State: result += " popl %ebx" + "\n" # epilog - result += x86_return + result += x86_return % t return result def arm_genstub(self,fname, flags, idname): |
