lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

004_arches_x32.patch (2529B)


      1 Index: libaio-0.3.109/src/syscall-x86_64.h
      2 ===================================================================
      3 --- libaio-0.3.109.orig/src/syscall-x86_64.h	2009-10-09 11:17:02.000000000 -0700
      4 +++ libaio-0.3.109/src/syscall-x86_64.h	2013-03-03 07:15:13.000000000 -0800
      5 @@ -1,8 +1,18 @@
      6 +#ifndef __NR_io_setup
      7  #define __NR_io_setup		206
      8 +#endif
      9 +#ifndef __NR_io_destroy
     10  #define __NR_io_destroy		207
     11 +#endif
     12 +#ifndef __NR_io_getevents
     13  #define __NR_io_getevents	208
     14 +#endif
     15 +#ifndef __NR_io_submit
     16  #define __NR_io_submit		209
     17 +#endif
     18 +#ifndef __NR_io_cancel
     19  #define __NR_io_cancel		210
     20 +#endif
     21  
     22  #define __syscall_clobber "r11","rcx","memory" 
     23  #define __syscall "syscall"
     24 @@ -42,10 +52,11 @@
     25  type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4)		\
     26  {									\
     27  long __res;								\
     28 -__asm__ volatile ("movq %5,%%r10 ;" __syscall				\
     29 +register long __a4 asm ("r10") = (long) arg4;                           \
     30 +__asm__ volatile (__syscall						\
     31  	: "=a" (__res)							\
     32  	: "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)),	\
     33 -	  "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
     34 +	  "d" ((long)(arg3)),"r" (__a4)); \
     35  return __res;								\
     36  } 
     37  
     38 @@ -54,10 +65,11 @@
     39  type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5)	\
     40  {									\
     41  long __res;								\
     42 -__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall		\
     43 +register long __a4 asm ("r10") = (long) arg4;				\
     44 +register long __a5 asm ("r8") = (long) arg5;                            \
     45 +__asm__ volatile (__syscall						\
     46  	: "=a" (__res)							\
     47  	: "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)),	\
     48 -	  "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) :	\
     49 -	__syscall_clobber,"r8","r10" );					\
     50 +	  "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \
     51  return __res;								\
     52  }
     53 Index: libaio-0.3.109/harness/main.c
     54 ===================================================================
     55 --- libaio-0.3.109.orig/harness/main.c	2013-03-03 06:58:51.000000000 -0800
     56 +++ libaio-0.3.109/harness/main.c	2013-03-03 07:23:40.000000000 -0800
     57 @@ -14,7 +14,7 @@
     58  #if __LP64__ == 0
     59  #if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
     60  #define KERNEL_RW_POINTER	((void *)0xc0010000)
     61 -#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__)
     62 +#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__) || defined(__x86_64__)
     63  #define KERNEL_RW_POINTER	((void *)0x00010000)
     64  #elif defined(__hppa__)
     65  #define KERNEL_RW_POINTER	((void *)0x10100000)