vppinfra: initial RISC-V support
[vpp.git] / src / vppinfra / types.h
index c5e7f09..598061b 100644 (file)
@@ -73,7 +73,9 @@ typedef unsigned int u32;
 typedef unsigned long long u64;
 #endif /* CLIB_AVOID_CLASH_WITH_LINUX_TYPES */
 
-#elif defined(alpha) || (defined(_mips) && __mips == 64) || defined(__x86_64__) || defined (__powerpc64__) || defined (__aarch64__)
+#elif defined(alpha) || (defined(_mips) && __mips == 64) ||                   \
+  defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__) ||    \
+  (defined(__riscv) && __riscv_xlen == 64)
 typedef signed int i32;
 typedef signed long i64;
 
@@ -163,6 +165,13 @@ typedef f64 fword;
        __attribute__ ((aligned (align), packed));      \
     } *) (addr))->_data)
 
+typedef u16 u16u __attribute__ ((aligned (1)));
+typedef u32 u32u __attribute__ ((aligned (1)));
+typedef u64 u64u __attribute__ ((aligned (1)));
+typedef i16 i16u __attribute__ ((aligned (1)));
+typedef i32 i32u __attribute__ ((aligned (1)));
+typedef i64 i64u __attribute__ ((aligned (1)));
+
 #endif /* included_clib_types_h */
 
 /*