Reviewed-by: Petri Savolainen <[email protected]> > -----Original Message----- > From: [email protected] [mailto:lng-odp- > [email protected]] On Behalf Of ext Mike Holmes > Sent: Wednesday, January 14, 2015 12:06 AM > To: [email protected] > Subject: [lng-odp] [PATCH 1/2] api: remove odp_compiler.h > > Compiler information should be predominately platform specific and not > part of the API. > The only part of the API needing these definitions is odp_byteorder.h so > move the definition there and delete odp_compiler.h > > Signed-off-by: Mike Holmes <[email protected]> > --- > platform/linux-generic/Makefile.am | 1 - > platform/linux-generic/include/api/odp.h | 2 - > platform/linux-generic/include/api/odp_byteorder.h | 27 +++++++++++- > platform/linux-generic/include/api/odp_compiler.h | 51 ----------------- > ----- > 4 files changed, 26 insertions(+), 55 deletions(-) > delete mode 100644 platform/linux-generic/include/api/odp_compiler.h > > diff --git a/platform/linux-generic/Makefile.am b/platform/linux- > generic/Makefile.am > index 4535c57..51cf69c 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -14,7 +14,6 @@ include_HEADERS = \ > $(top_srcdir)/platform/linux- > generic/include/api/odp_buffer_pool.h \ > $(top_srcdir)/platform/linux- > generic/include/api/odp_byteorder.h \ > $(top_srcdir)/platform/linux- > generic/include/api/odp_classification.h \ > - $(top_srcdir)/platform/linux- > generic/include/api/odp_compiler.h \ > $(top_srcdir)/platform/linux- > generic/include/api/odp_config.h \ > $(top_srcdir)/platform/linux- > generic/include/api/odp_coremask.h \ > $(top_srcdir)/platform/linux- > generic/include/api/odp_crypto.h \ > diff --git a/platform/linux-generic/include/api/odp.h b/platform/linux- > generic/include/api/odp.h > index b7b1ca9..920fc58 100644 > --- a/platform/linux-generic/include/api/odp.h > +++ b/platform/linux-generic/include/api/odp.h > @@ -19,10 +19,8 @@ extern "C" { > #endif > > #include <odp_config.h> > - > #include <odp_version.h> > #include <odp_std_types.h> > -#include <odp_compiler.h> > #include <odp_align.h> > #include <odp_hints.h> > #include <odp_debug.h> > diff --git a/platform/linux-generic/include/api/odp_byteorder.h > b/platform/linux-generic/include/api/odp_byteorder.h > index 5890011..f5514d9 100644 > --- a/platform/linux-generic/include/api/odp_byteorder.h > +++ b/platform/linux-generic/include/api/odp_byteorder.h > @@ -21,7 +21,32 @@ extern "C" { > #include <endian.h> > #include <asm/byteorder.h> > #include <odp_std_types.h> > -#include <odp_compiler.h> > + > +/** @addtogroup odp_compiler_optim > + * Macro for old compilers > + * @{ > + */ > + > +/** @internal GNU compiler version */ > +#define GCC_VERSION (__GNUC__ * 10000 \ > + + __GNUC_MINOR__ * 100 \ > + + __GNUC_PATCHLEVEL__) > + > +/** > + * @internal > + * Compiler __builtin_bswap16() is not available on all platforms > + * until GCC 4.8.0 - work around this by offering __odp_builtin_bswap16() > + * Don't use this function directly, instead see odp_byteorder.h > + */ > +#if GCC_VERSION < 40800 > +#define __odp_builtin_bswap16(u16) ((((u16)&0x00ff) << 8)|(((u16)&0xff00) > >> 8)) > +#else > +#define __odp_builtin_bswap16(u16) __builtin_bswap16(u16) > +#endif > + > +/** > + * @} > + */ > > /** @defgroup odp_compiler_optim ODP COMPILER / OPTIMIZATION > * Macros that check byte order and byte converting operations. > diff --git a/platform/linux-generic/include/api/odp_compiler.h > b/platform/linux-generic/include/api/odp_compiler.h > deleted file mode 100644 > index 71a4431..0000000 > --- a/platform/linux-generic/include/api/odp_compiler.h > +++ /dev/null > @@ -1,51 +0,0 @@ > -/* Copyright (c) 2014, Linaro Limited > - * All rights reserved. > - * > - * SPDX-License-Identifier: BSD-3-Clause > - */ > - > - > -/** > - * @file > - * > - * Compiler related > - */ > - > -#ifndef ODP_COMPILER_H_ > -#define ODP_COMPILER_H_ > - > -#ifdef __cplusplus > -extern "C" { > -#endif > - > -/** @addtogroup odp_compiler_optim > - * Macro for old compilers > - * @{ > - */ > - > -/** @internal GNU compiler version */ > -#define GCC_VERSION (__GNUC__ * 10000 \ > - + __GNUC_MINOR__ * 100 \ > - + __GNUC_PATCHLEVEL__) > - > -/** > - * @internal > - * Compiler __builtin_bswap16() is not available on all platforms > - * until GCC 4.8.0 - work around this by offering __odp_builtin_bswap16() > - * Don't use this function directly, instead see odp_byteorder.h > - */ > -#if GCC_VERSION < 40800 > -#define __odp_builtin_bswap16(u16) ((((u16)&0x00ff) << 8)|(((u16)&0xff00) > >> 8)) > -#else > -#define __odp_builtin_bswap16(u16) __builtin_bswap16(u16) > -#endif > - > -/** > - * @} > - */ > - > -#ifdef __cplusplus > -} > -#endif > - > -#endif > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
