[OpenBIOS] [PATCH 4/5] On ppc64 host, elf_vrreg_t is defined as __vector128

Laurent Vivier laurent at vivier.eu
Sat Oct 24 11:17:00 CEST 2015


so we define __vector128 in arch/*/types.h as we can't include
the system asm/types.h

Also define __<type> (__u8, __u16, ...), when they are missing.

Signed-off-by: Laurent Vivier <laurent at vivier.eu>
---
 include/arch/ppc/types.h     |  5 +++++
 include/arch/sparc32/types.h | 13 +++++++++++++
 include/arch/sparc64/types.h | 13 +++++++++++++
 3 files changed, 31 insertions(+)

diff --git a/include/arch/ppc/types.h b/include/arch/ppc/types.h
index 69b3db4..55a979f 100644
--- a/include/arch/ppc/types.h
+++ b/include/arch/ppc/types.h
@@ -101,4 +101,9 @@ typedef int		__s32;
 typedef long long	s64;
 typedef long long	__s64;
 
+#ifdef __powerpc64__
+typedef struct {
+	__u32 u[4];
+} __attribute__((aligned(16))) __vector128;
+#endif
 #endif
diff --git a/include/arch/sparc32/types.h b/include/arch/sparc32/types.h
index 3f37d4e..68cee94 100644
--- a/include/arch/sparc32/types.h
+++ b/include/arch/sparc32/types.h
@@ -81,13 +81,26 @@ typedef uint32_t        prom_uarg_t;
 /* size named types */
 
 typedef unsigned char   u8;
+typedef unsigned char   __u8;
 typedef unsigned short u16;
+typedef unsigned short __u16;
 typedef unsigned int   u32;
+typedef unsigned int   __u32;
 typedef unsigned long long u64;
+typedef unsigned long long __u64;
 
 typedef signed char	s8;
+typedef signed char	__s8;
 typedef short		s16;
+typedef short		__s16;
 typedef int		s32;
+typedef int		__s32;
 typedef long long	s64;
+typedef long long	__s64;
 
+#ifdef __powerpc64__
+typedef struct {
+	__u32 u[4];
+} __attribute__((aligned(16))) __vector128;
+#endif
 #endif
diff --git a/include/arch/sparc64/types.h b/include/arch/sparc64/types.h
index a26fccb..86c8fd4 100644
--- a/include/arch/sparc64/types.h
+++ b/include/arch/sparc64/types.h
@@ -90,13 +90,26 @@ typedef __uint128_t    ducell;
 /* size named types */
 
 typedef unsigned char   u8;
+typedef unsigned char   __u8;
 typedef unsigned short u16;
+typedef unsigned short __u16;
 typedef unsigned int   u32;
+typedef unsigned int   __u32;
 typedef unsigned long long u64;
+typedef unsigned long long __u64;
 
 typedef signed char	s8;
+typedef signed char	__s8;
 typedef short		s16;
+typedef short		__s16;
 typedef int		s32;
+typedef int		__s32;
 typedef long long	s64;
+typedef long long	__s64;
 
+#ifdef __powerpc64__
+typedef struct {
+	__u32 u[4];
+} __attribute__((aligned(16))) __vector128;
+#endif
 #endif
-- 
2.4.3




More information about the OpenBIOS mailing list