8250269: Replace ATTRIBUTE_ALIGNED with alignas
Reviewed-by: rkennke, kbarrett
This commit is contained in:
parent
a66b5df14a
commit
ab86d23adf
@ -50,7 +50,7 @@ class oopDesc;
|
||||
#endif
|
||||
|
||||
#ifndef ATTRIBUTE_ALIGNED
|
||||
#define ATTRIBUTE_ALIGNED(x)
|
||||
#define ATTRIBUTE_ALIGNED(x) alignas(x)
|
||||
#endif
|
||||
|
||||
#ifndef ATTRIBUTE_FLATTEN
|
||||
|
@ -141,7 +141,7 @@ inline int g_isfinite(jdouble f) { return isfinite(f); }
|
||||
// temporarily disabled.
|
||||
#define offset_of(klass,field) \
|
||||
([]() { \
|
||||
char space[sizeof (klass)] ATTRIBUTE_ALIGNED(16); \
|
||||
alignas(16) char space[sizeof (klass)]; \
|
||||
klass* dummyObj = (klass*)space; \
|
||||
char* c = (char*)(void*)&dummyObj->field; \
|
||||
return (size_t)(c - space); \
|
||||
@ -160,8 +160,4 @@ inline int g_isfinite(jdouble f) { return isfinite(f); }
|
||||
#define ALWAYSINLINE inline __attribute__ ((always_inline))
|
||||
#define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
|
||||
|
||||
// Alignment
|
||||
//
|
||||
#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
|
||||
|
||||
#endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
|
||||
|
@ -115,9 +115,6 @@ inline int g_isfinite(jdouble f) { return _finite(f); }
|
||||
#define NOINLINE __declspec(noinline)
|
||||
#define ALWAYSINLINE __forceinline
|
||||
|
||||
// Alignment
|
||||
#define ATTRIBUTE_ALIGNED(x) __declspec(align(x))
|
||||
|
||||
#ifdef _M_ARM64
|
||||
#define USE_VECTORED_EXCEPTION_HANDLING
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user