OSDN Git Service

add syscalls ioperm and iopl
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 27 Feb 2015 11:11:35 +0000 (19:11 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 11 Mar 2015 17:09:56 +0000 (01:09 +0800)
libc/SYSCALLS.TXT
libc/arch-x86/syscalls/ioperm.S [new file with mode: 0644]
libc/arch-x86/syscalls/iopl.S [new file with mode: 0644]
libc/arch-x86_64/syscalls/ioperm.S [new file with mode: 0644]
libc/arch-x86_64/syscalls/iopl.S [new file with mode: 0644]

index c3b7bab..0fddb6a 100644 (file)
@@ -326,6 +326,8 @@ int     __set_tls:set_thread_area(void*) mips,mips64
 
 # x86-specific
 int     __set_thread_area:set_thread_area(void*) x86
+int    ioperm(unsigned long, unsigned long, int) x86,x86_64
+int    iopl(int) x86,x86_64
 
 # vdso stuff.
 int clock_gettime(clockid_t, timespec*)                 arm,mips,mips64,x86
diff --git a/libc/arch-x86/syscalls/ioperm.S b/libc/arch-x86/syscalls/ioperm.S
new file mode 100644 (file)
index 0000000..6e8bdeb
--- /dev/null
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <private/bionic_asm.h>
+
+ENTRY(ioperm)
+    pushl   %ebx
+    .cfi_def_cfa_offset 8
+    .cfi_rel_offset ebx, 0
+    pushl   %ecx
+    .cfi_adjust_cfa_offset 4
+    .cfi_rel_offset ecx, 0
+    pushl   %edx
+    .cfi_adjust_cfa_offset 4
+    .cfi_rel_offset edx, 0
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_ioperm, %eax
+    int     $0x80
+    cmpl    $-MAX_ERRNO, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno_internal
+    addl    $4, %esp
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
+END(ioperm)
diff --git a/libc/arch-x86/syscalls/iopl.S b/libc/arch-x86/syscalls/iopl.S
new file mode 100644 (file)
index 0000000..aafa4dd
--- /dev/null
@@ -0,0 +1,21 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <private/bionic_asm.h>
+
+ENTRY(iopl)
+    pushl   %ebx
+    .cfi_def_cfa_offset 8
+    .cfi_rel_offset ebx, 0
+    mov     8(%esp), %ebx
+    movl    $__NR_iopl, %eax
+    int     $0x80
+    cmpl    $-MAX_ERRNO, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno_internal
+    addl    $4, %esp
+1:
+    popl    %ebx
+    ret
+END(iopl)
diff --git a/libc/arch-x86_64/syscalls/ioperm.S b/libc/arch-x86_64/syscalls/ioperm.S
new file mode 100644 (file)
index 0000000..57d3822
--- /dev/null
@@ -0,0 +1,15 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <private/bionic_asm.h>
+
+ENTRY(ioperm)
+    movl    $__NR_ioperm, %eax
+    syscall
+    cmpq    $-MAX_ERRNO, %rax
+    jb      1f
+    negl    %eax
+    movl    %eax, %edi
+    call    __set_errno_internal
+1:
+    ret
+END(ioperm)
diff --git a/libc/arch-x86_64/syscalls/iopl.S b/libc/arch-x86_64/syscalls/iopl.S
new file mode 100644 (file)
index 0000000..85f82de
--- /dev/null
@@ -0,0 +1,15 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <private/bionic_asm.h>
+
+ENTRY(iopl)
+    movl    $__NR_iopl, %eax
+    syscall
+    cmpq    $-MAX_ERRNO, %rax
+    jb      1f
+    negl    %eax
+    movl    %eax, %edi
+    call    __set_errno_internal
+1:
+    ret
+END(iopl)