Use __IBM_ATTRIBUTES and __IBM_ALIGNOF__ from IBM compiler manual
parent
2fe5177d07
commit
652d0e42bf
3
config.h
3
config.h
|
|
@ -354,13 +354,14 @@ NAMESPACE_END
|
||||||
|
|
||||||
// Sun Studio Express 3 (December 2006) provides GCC-style attributes.
|
// Sun Studio Express 3 (December 2006) provides GCC-style attributes.
|
||||||
// IBM XL C/C++ alignment modifier per Optimization Guide, pp. 19-20.
|
// IBM XL C/C++ alignment modifier per Optimization Guide, pp. 19-20.
|
||||||
|
// __IBM_ATTRIBUTES per XLC 12.1 AIX Compiler Manual, p. 473.
|
||||||
// CRYPTOPP_ALIGN_DATA may not be reliable on AIX.
|
// CRYPTOPP_ALIGN_DATA may not be reliable on AIX.
|
||||||
#ifndef CRYPTOPP_ALIGN_DATA
|
#ifndef CRYPTOPP_ALIGN_DATA
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
|
#define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
|
||||||
#elif defined(__GNUC__) || (__SUNPRO_CC >= 0x5100)
|
#elif defined(__GNUC__) || (__SUNPRO_CC >= 0x5100)
|
||||||
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
|
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
|
||||||
#elif defined(__xlc__) || defined(__xlC__)
|
#elif defined(__xlc__) || defined(__xlC__) || defined(__IBM_ATTRIBUTES)
|
||||||
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
|
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
|
||||||
#else
|
#else
|
||||||
#define CRYPTOPP_ALIGN_DATA(x)
|
#define CRYPTOPP_ALIGN_DATA(x)
|
||||||
|
|
|
||||||
2
misc.h
2
misc.h
|
|
@ -1060,6 +1060,8 @@ inline unsigned int GetAlignmentOf()
|
||||||
return __alignof__(T);
|
return __alignof__(T);
|
||||||
#elif defined(__SUNPRO_CC)
|
#elif defined(__SUNPRO_CC)
|
||||||
return __alignof__(T);
|
return __alignof__(T);
|
||||||
|
#elif defined(__IBM_ALIGNOF__)
|
||||||
|
return __alignof__(T);
|
||||||
#elif CRYPTOPP_BOOL_SLOW_WORD64
|
#elif CRYPTOPP_BOOL_SLOW_WORD64
|
||||||
return UnsignedMin(4U, sizeof(T));
|
return UnsignedMin(4U, sizeof(T));
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue