summaryrefslogtreecommitdiff
path: root/iopl.S
blob: 3037ff64dd52d0fb9ed4741b30236e9e6d066589 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
	/* autogenerated by gensyscalls.py */
	/* #include <sys/linux-syscalls.h> */

#if !defined __ASM_ARM_UNISTD_H && !defined __ASM_I386_UNISTD_H
#if defined __arm__ && !defined __ARM_EABI__ && !defined __thumb__
  #  define __NR_SYSCALL_BASE  0x900000
  #else
  #  define  __NR_SYSCALL_BASE  0
  #endif
#endif

	
#define __NR_iopl (__NR_SYSCALL_BASE+110)  /* refert to linux-2.6/arch/x86/include/asm/unistd_32.h */
	
	    .text
	    .type iopl, @function
	    .globl iopl
	    .align 4

	iopl:
	    pushl   %ebx
	    mov     8(%esp), %ebx
	    movl    $__NR_iopl, %eax
	    int     $0x80
	    cmpl    $-129, %eax
	    jb      1f
	    negl    %eax
	    pushl   %eax
	    call    __set_errno
	    addl    $4, %esp
	    orl     $-1, %eax
	1:
	    popl    %ebx
	    ret