Commit e6983131 by Nicolas Capens Committed by Gerrit Code Review

Merge "Implement ICE_CACHELINE_BOUNDARY for Visual Studio."

parents cc8bc16f d5e7cafb
...@@ -289,10 +289,14 @@ using TimerIdT = uint32_t; ...@@ -289,10 +289,14 @@ using TimerIdT = uint32_t;
enum { MaxCacheLineSize = 64 }; enum { MaxCacheLineSize = 64 };
// Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration
// list to be aligned to the next cache line. // list to be aligned to the next cache line.
#if defined(_MSC_VER)
#define ICE_CACHELINE_BOUNDARY __declspec(align(MaxCacheLineSize)) int : 0;
#else // !defined(_MSC_VER)
// Note: zero is added to work around the following GCC 4.8 bug (fixed in 4.9): // Note: zero is added to work around the following GCC 4.8 bug (fixed in 4.9):
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382
#define ICE_CACHELINE_BOUNDARY \ #define ICE_CACHELINE_BOUNDARY \
__attribute__((aligned(MaxCacheLineSize + 0))) int : 0 __attribute__((aligned(MaxCacheLineSize + 0))) int : 0
#endif // !defined(_MSC_VER)
/// PNaCl is ILP32, so theoretically we should only need 32-bit offsets. /// PNaCl is ILP32, so theoretically we should only need 32-bit offsets.
using RelocOffsetT = int32_t; using RelocOffsetT = int32_t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment