Message ID | 1455701546-48997-1-git-send-email-christophe.milard@linaro.org |
---|---|
State | New |
Headers | show |
For this series: Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> On Wed, Feb 17, 2016 at 3:32 AM, Christophe Milard < christophe.milard@linaro.org> wrote: > The file is, of course, largely inspired from its equivalent on the > application interface. > > Signed-off-by: Christophe Milard <christophe.milard@linaro.org> > --- > include/odp/drv/spec/compiler.h | 51 > +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 include/odp/drv/spec/compiler.h > > diff --git a/include/odp/drv/spec/compiler.h > b/include/odp/drv/spec/compiler.h > new file mode 100644 > index 0000000..3198d21 > --- /dev/null > +++ b/include/odp/drv/spec/compiler.h > @@ -0,0 +1,51 @@ > +/* Copyright (c) 2016, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +/** > + * @file > + * > + * Compiler related for ODP driver interface > + */ > + > +#ifndef ODPDRV_COMPILER_H_ > +#define ODPDRV_COMPILER_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/** @addtogroup odpdrv_compiler_optim ODPDRV COMPILER / OPTIMIZATION > + * 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 > __odpdrv_builtin_bswap16() > + * Don't use this function directly, instead see odpdrv byteorder.h > + */ > +#if GCC_VERSION < 40800 > +#define __odpdrv_builtin_bswap16(u16) \ > + ((((u16)&0x00ff) << 8) | (((u16)&0xff00) > >> 8)) > +#else > +#define __odpdrv_builtin_bswap16(u16) __builtin_bswap16(u16) > +#endif > + > +/** > + * @} > + */ > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > -- > 2.1.4 > >
ping for merge... On 18 February 2016 at 02:25, Bill Fischofer <bill.fischofer@linaro.org> wrote: > For this series: > > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> > > On Wed, Feb 17, 2016 at 3:32 AM, Christophe Milard < > christophe.milard@linaro.org> wrote: > >> The file is, of course, largely inspired from its equivalent on the >> application interface. >> >> Signed-off-by: Christophe Milard <christophe.milard@linaro.org> >> --- >> include/odp/drv/spec/compiler.h | 51 >> +++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 51 insertions(+) >> create mode 100644 include/odp/drv/spec/compiler.h >> >> diff --git a/include/odp/drv/spec/compiler.h >> b/include/odp/drv/spec/compiler.h >> new file mode 100644 >> index 0000000..3198d21 >> --- /dev/null >> +++ b/include/odp/drv/spec/compiler.h >> @@ -0,0 +1,51 @@ >> +/* Copyright (c) 2016, Linaro Limited >> + * All rights reserved. >> + * >> + * SPDX-License-Identifier: BSD-3-Clause >> + */ >> + >> +/** >> + * @file >> + * >> + * Compiler related for ODP driver interface >> + */ >> + >> +#ifndef ODPDRV_COMPILER_H_ >> +#define ODPDRV_COMPILER_H_ >> + >> +#ifdef __cplusplus >> +extern "C" { >> +#endif >> + >> +/** @addtogroup odpdrv_compiler_optim ODPDRV COMPILER / OPTIMIZATION >> + * 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 >> __odpdrv_builtin_bswap16() >> + * Don't use this function directly, instead see odpdrv byteorder.h >> + */ >> +#if GCC_VERSION < 40800 >> +#define __odpdrv_builtin_bswap16(u16) \ >> + ((((u16)&0x00ff) << 8) | (((u16)&0xff00) >> >> 8)) >> +#else >> +#define __odpdrv_builtin_bswap16(u16) __builtin_bswap16(u16) >> +#endif >> + >> +/** >> + * @} >> + */ >> + >> +#ifdef __cplusplus >> +} >> +#endif >> + >> +#endif >> -- >> 2.1.4 >> >> >
Merged, Maxim. On 03/30/16 11:37, Christophe Milard wrote: > ping for merge... > > On 18 February 2016 at 02:25, Bill Fischofer > <bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote: > > For this series: > > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> > > On Wed, Feb 17, 2016 at 3:32 AM, Christophe Milard > <christophe.milard@linaro.org > <mailto:christophe.milard@linaro.org>> wrote: > > The file is, of course, largely inspired from its equivalent > on the > application interface. > > Signed-off-by: Christophe Milard <christophe.milard@linaro.org > <mailto:christophe.milard@linaro.org>> > --- > include/odp/drv/spec/compiler.h | 51 > +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 include/odp/drv/spec/compiler.h > > diff --git a/include/odp/drv/spec/compiler.h > b/include/odp/drv/spec/compiler.h > new file mode 100644 > index 0000000..3198d21 > --- /dev/null > +++ b/include/odp/drv/spec/compiler.h > @@ -0,0 +1,51 @@ > +/* Copyright (c) 2016, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +/** > + * @file > + * > + * Compiler related for ODP driver interface > + */ > + > +#ifndef ODPDRV_COMPILER_H_ > +#define ODPDRV_COMPILER_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/** @addtogroup odpdrv_compiler_optim ODPDRV COMPILER / > OPTIMIZATION > + * 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 > __odpdrv_builtin_bswap16() > + * Don't use this function directly, instead see odpdrv > byteorder.h > + */ > +#if GCC_VERSION < 40800 > +#define __odpdrv_builtin_bswap16(u16) \ > + ((((u16)&0x00ff) << 8) | (((u16)&0xff00) >> 8)) > +#else > +#define __odpdrv_builtin_bswap16(u16) __builtin_bswap16(u16) > +#endif > + > +/** > + * @} > + */ > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > -- > 2.1.4 > > > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/include/odp/drv/spec/compiler.h b/include/odp/drv/spec/compiler.h new file mode 100644 index 0000000..3198d21 --- /dev/null +++ b/include/odp/drv/spec/compiler.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Compiler related for ODP driver interface + */ + +#ifndef ODPDRV_COMPILER_H_ +#define ODPDRV_COMPILER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup odpdrv_compiler_optim ODPDRV COMPILER / OPTIMIZATION + * 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 __odpdrv_builtin_bswap16() + * Don't use this function directly, instead see odpdrv byteorder.h + */ +#if GCC_VERSION < 40800 +#define __odpdrv_builtin_bswap16(u16) \ + ((((u16)&0x00ff) << 8) | (((u16)&0xff00) >> 8)) +#else +#define __odpdrv_builtin_bswap16(u16) __builtin_bswap16(u16) +#endif + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif
The file is, of course, largely inspired from its equivalent on the application interface. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- include/odp/drv/spec/compiler.h | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 include/odp/drv/spec/compiler.h