Add SH supprt
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tue, 26 Feb 2019 04:26:21 +0000 (04:26 +0000)
committerGuillem Jover <guillem@debian.org>
Tue, 26 Feb 2019 04:26:21 +0000 (04:26 +0000)
The test-suite logs can be found at:

<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535288>

Gbp-Pq: Name 00_arches_sh.patch

harness/main.c
src/libaio.h
src/syscall-sh.h [new file with mode: 0644]
src/syscall.h

index 280ef5626a4b774fb89f72d9dd7b27c665bcffc5..99232ef14ca3569452ad289233fe2a2588917850 100644 (file)
@@ -14,7 +14,7 @@
 #if __LP64__ == 0
 #if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
 #define KERNEL_RW_POINTER      ((void *)0xc0010000)
-#elif defined(__arm__) || defined(__m68k__) || defined(__s390__)
+#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__)
 #define KERNEL_RW_POINTER      ((void *)0x00010000)
 #elif defined(__hppa__)
 #define KERNEL_RW_POINTER      ((void *)0x10100000)
index eecd53ae7e2a09c4e17d32f9f96aed8630cb23ab..a9dbe6ee9540415ba191d586b74ded1287585ff0 100644 (file)
@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
 
 /* little endian, 32 bits */
 #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
-    defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
+    (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
+    defined(__bfin__) || defined(__MIPSEL__) || \
     defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
     (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
          __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
@@ -84,6 +85,7 @@ typedef enum io_iocb_cmd {
 /* big endian, 32 bits */
 #elif defined(__PPC__) || defined(__s390__) || \
       (defined(__arm__) && defined(__ARMEB__)) || \
+      (defined(__sh__) && defined (__BIG_ENDIAN__)) || \
       defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
       defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
       (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
diff --git a/src/syscall-sh.h b/src/syscall-sh.h
new file mode 100644 (file)
index 0000000..6c00573
--- /dev/null
@@ -0,0 +1,6 @@
+/* Copy from ./arch/sh/include/asm/unistd_32.h */
+#define __NR_io_setup       245
+#define __NR_io_destroy     246
+#define __NR_io_getevents   247
+#define __NR_io_submit      248
+#define __NR_io_cancel      249
index a88876f4b4b81381dba46b8aabbc5e08c7e4d116..b86d7457ec42416749e638cfaef4228cf53d13ac 100644 (file)
@@ -33,6 +33,8 @@
 #include "syscall-parisc.h"
 #elif defined(__mips__)
 #include "syscall-mips.h"
+#elif defined(__sh__)
+#include "syscall-sh.h"
 #elif defined(__aarch64__) || defined(__riscv)
 #include "syscall-generic.h"
 #else