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
|
#endif
|
||||||
|
|
||||||
#ifndef ATTRIBUTE_ALIGNED
|
#ifndef ATTRIBUTE_ALIGNED
|
||||||
#define ATTRIBUTE_ALIGNED(x)
|
#define ATTRIBUTE_ALIGNED(x) alignas(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ATTRIBUTE_FLATTEN
|
#ifndef ATTRIBUTE_FLATTEN
|
||||||
|
@ -141,7 +141,7 @@ inline int g_isfinite(jdouble f) { return isfinite(f); }
|
|||||||
// temporarily disabled.
|
// temporarily disabled.
|
||||||
#define offset_of(klass,field) \
|
#define offset_of(klass,field) \
|
||||||
([]() { \
|
([]() { \
|
||||||
char space[sizeof (klass)] ATTRIBUTE_ALIGNED(16); \
|
alignas(16) char space[sizeof (klass)]; \
|
||||||
klass* dummyObj = (klass*)space; \
|
klass* dummyObj = (klass*)space; \
|
||||||
char* c = (char*)(void*)&dummyObj->field; \
|
char* c = (char*)(void*)&dummyObj->field; \
|
||||||
return (size_t)(c - space); \
|
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 ALWAYSINLINE inline __attribute__ ((always_inline))
|
||||||
#define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
|
#define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
|
||||||
|
|
||||||
// Alignment
|
|
||||||
//
|
|
||||||
#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
|
|
||||||
|
|
||||||
#endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
|
#endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
|
||||||
|
@ -115,9 +115,6 @@ inline int g_isfinite(jdouble f) { return _finite(f); }
|
|||||||
#define NOINLINE __declspec(noinline)
|
#define NOINLINE __declspec(noinline)
|
||||||
#define ALWAYSINLINE __forceinline
|
#define ALWAYSINLINE __forceinline
|
||||||
|
|
||||||
// Alignment
|
|
||||||
#define ATTRIBUTE_ALIGNED(x) __declspec(align(x))
|
|
||||||
|
|
||||||
#ifdef _M_ARM64
|
#ifdef _M_ARM64
|
||||||
#define USE_VECTORED_EXCEPTION_HANDLING
|
#define USE_VECTORED_EXCEPTION_HANDLING
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user