RFR: 8203220: Introduce ATTRIBUTE_ALIGNED macro
Per Liden
per.liden at oracle.com
Tue May 15 13:31:56 UTC 2018
This patch introduces a global ATTRIBUTE_ALIGNED(x) macro, which expands
to __attribute__((aligned(x)) or the equivalent of that.
We already use this attribute is some parts of the code, but we haven't
had a macro in globalDefinitions.hpp for this.
In the src/hotspot/cpu/x86/macroAssembler_x86_*.cpp files I chose to
keep the ALIGNED_(x) and just define it as ATTRIBUTE_ALIGNED(x), instead
of changing all uses of it.
Also, for GCC I've included a workaround for a known bug (see the
comment in the file). I thought it would be nice to include that since
it might otherwise affect quite a few systems.
And finally, we don't really have a uniform naming standard for these
types of attributes. E.g. we have NOINLINE/ALWAYSINLINE and we have
ATTRIBUTE_PRINTF. I chose to use the ATTRIBUTE_ prefix, instead of just
ALIGNED, since ALIGNED is somewhat generic and we already have at least
one place where a variable is named ALIGNED, so it would conflict.
Bug: https://bugs.openjdk.java.net/browse/JDK-8203220
Webrev: http://cr.openjdk.java.net/~pliden/8203220/webrev.0
Testing: hs-tier{1,2}
/Per
More information about the hotspot-dev
mailing list