changeset 49328:efe4cba9f374

ZGC: UPSTREAM: Add ATTRIBUTE_ALIGNED macro
author duke
date Wed, 14 Mar 2018 10:39:43 +0100
parents 5aa3949ba497
children 214f81902271
files src/hotspot/share/utilities/globalDefinitions.hpp src/hotspot/share/utilities/globalDefinitions_gcc.hpp src/hotspot/share/utilities/globalDefinitions_sparcWorks.hpp
diffstat 3 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/utilities/globalDefinitions.hpp	Wed Mar 14 10:39:43 2018 +0100
+++ b/src/hotspot/share/utilities/globalDefinitions.hpp	Wed Mar 14 10:39:43 2018 +0100
@@ -46,6 +46,10 @@
 #define UNLIKELY(x)               (x)
 #endif
 
+#ifndef ATTRIBUTE_ALIGNED
+#define ATTRIBUTE_ALIGNED(x)
+#endif
+
 // This file holds all globally used constants & types, class (forward)
 // declarations and a few frequently used utility functions.
 
--- a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp	Wed Mar 14 10:39:43 2018 +0100
+++ b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp	Wed Mar 14 10:39:43 2018 +0100
@@ -277,4 +277,7 @@
 #define LIKELY(x)                    __builtin_expect(!!(x), 1)
 #define UNLIKELY(x)                  __builtin_expect(!!(x), 0)
 
+// Alignment
+#define ATTRIBUTE_ALIGNED(x)        __attribute__((aligned(x)))
+
 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
--- a/src/hotspot/share/utilities/globalDefinitions_sparcWorks.hpp	Wed Mar 14 10:39:43 2018 +0100
+++ b/src/hotspot/share/utilities/globalDefinitions_sparcWorks.hpp	Wed Mar 14 10:39:43 2018 +0100
@@ -255,6 +255,9 @@
 #define THREAD_LOCAL_DECL __thread
 #endif
 
+// Alignment
+#define ATTRIBUTE_ALIGNED(x)        __attribute__((aligned(x)))
+
 // Inlining support
 #define NOINLINE
 #define ALWAYSINLINE inline __attribute__((always_inline))