From 1ebc3c0868c74833aabe3775509d65ae29cd4925 Mon Sep 17 00:00:00 2001 From: Greg Still Date: Tue, 14 Apr 2015 08:29:05 -0500 Subject: Add common ppe_compiler.mk and proc_hcd_common.H - ppe_compiler.mk for pointing to the common PPE compiler across platforms - proc_hcd_common.H for things common across PPE HCD procedures Change-Id: Ic8883a655eacfcd860e0036c516555ab12984d08 New PPE getscom routines leveragin upgraded compiler - Pass pointers to data elements to use indexed lvdx/stvdx instructions Change-Id: I7b99393919bc533bac5743001ee2c50b778eb2b2 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17172 Reviewed-by: Glenn R. Miles Reviewed-by: Brian Silver Reviewed-by: Derk Rembold Tested-by: Derk Rembold --- include/ppe_compiler.mk | 59 +++++++++++++++++++++++++++++++++++++++++++++++ include/proc_hcd_common.H | 20 ++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100755 include/ppe_compiler.mk create mode 100644 include/proc_hcd_common.H (limited to 'include') diff --git a/include/ppe_compiler.mk b/include/ppe_compiler.mk new file mode 100755 index 00000000..7db9a4ca --- /dev/null +++ b/include/ppe_compiler.mk @@ -0,0 +1,59 @@ +# Make header to set up PPE Compiler +# +ifndef CC_VERSION +export CC_VERSION = 4.8.3 +endif + +ifndef CC_TARGET +export CC_TARGET = powerpc-buildroot-linux-gnu +endif + +# GCC libraries +ifndef LIB_GCC_DIR +export LIB_GCC_DIR = $(CC_ROOT)/usr/lib/gcc/$(CC_TARGET)/$(CC_VERSION) +endif +LIB_DIRS += -L$(LIB_GCC_DIR) + +# GCC libraries +ifndef LIB_GCC_BASE +export LIB_GCC_BASE = $(CC_ROOT)/usr/lib/gcc/$(CC_TARGET) +endif +LIB_DIRS += -L$(LIB_GCC_BASE) + +# GCC libraries +ifndef LIB_BASE +export LIB_BASE = $(CC_ROOT)/usr/lib +endif +LIB_DIRS += -L$(LIB_BASE) + +# Shared Object C and C++ libraries +ifndef LIB_TARGET +export LIB_TARGET = $(CC_ROOT)/usr/$(CC_TARGET)/lib +endif +#CLIBS += $(LIB_TARGET)/libstdc++.a +#LIB_DIRS += -L$(LIB_TARGET) + +# Static C and C++ libraries +ifndef LIB_CLIB_DIR +export LIB_CLIB_DIR = $(CC_ROOT)/usr/$(CC_TARGET)/sysroot/lib +endif +LIB_DIRS += -L$(LIB_CLIB_DIR) + +# Runtime Static C and C++ libraries +ifndef LIB_CULIB_DIR +export LIB_CULIB_DIR = $(CC_ROOT)/usr/$(CC_TARGET)/sysroot/usr/lib +endif +LIB_DIRS += -L$(LIB_CULIB_DIR) + +GCCLIBS += $(LIB_CULIB_DIR)/libstdc++.a +GCCLIBS += $(LIB_CULIB_DIR)/libm.a +GCCLIBS += $(LIB_CULIB_DIR)/libc.a + +ifdef ENABLE_UCLIB +GCCLIBS += $(LIB_CULIB_DIR)/uclibc_nonshared.a +GCCLIBS += $(LIB_CULIB_DIR)/crt1.o +GCCLIBS += $(LIB_CULIB_DIR)/crti.o +endif + +GCCLIBS += $(LIB_GCC_DIR)/libgcc.a +GCCLIBS += $(LIB_GCC_DIR)/libgcc_eh.a diff --git a/include/proc_hcd_common.H b/include/proc_hcd_common.H new file mode 100644 index 00000000..51cc1285 --- /dev/null +++ b/include/proc_hcd_common.H @@ -0,0 +1,20 @@ +#ifndef __PROC_HCD_COMMON_H +#define __PROC_HCD_COMMON_H + +/// \file proc_hcd_common.H +/// \brief Standard bit-manipulation macros (C and Assembler) for PORE code + +/// \defgroup be64_bits Bit manipulation for 64-bit Big-Endian values +/// +/// \note These macros only work in the assembler context because we build our +/// assemblers to do 64-bit arithmetic, which is required for PORE assembly. +/// +/// @{ + +/// Create a multi-bit mask of \a n bits starting at bit \a b +#define BITS(b, n) ((ULL(0xffffffffffffffff) << (64 - (n))) >> (b)) + +/// Create a single bit mask at bit \a b +#define BIT(b) BITS((b), 1) + +#endif // __PROC_HCD_COMMON_H -- cgit v1.2.1