RFR: 8241042: x86_64: Improve Assembler generation
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon Mar 16 17:25:34 UTC 2020
On 3/16/20 8:40 AM, Claes Redestad wrote:
> Hi,
>
> on x64, folding consecutive bytes emitted by Assembler routines into
> byte-wise variants of emit_int16, emit_int24 and emit_32 turns out to
> be profitable, since gcc can't seem to fold the back to back stores
> to the end() pointer into one. The new methods are also a bit
> convenient.
Yes, I agree with this.
Can you put () around arguments like next? It would be easy see them:
emit_int24((0x44 | regenc), (scale << 6 | indexenc | baseenc), (disp & 0xFF));
Or better put them on separate lines as you did in some cases.
Can we avoid cast (unsigned char) or should we do it always (when sign bit may be set)? I seems we added it to avoid
additional instructions generated by gcc.
>
> Together with a few other small fixes, this adds up to around a 0.4%
> reduction in instructions retired on Hello World.
I wish you did these small fixes as separate RFE. Changes are already big.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8241042
> Webrev: http://cr.openjdk.java.net/~redestad/8241042/open.00/
Thanks,
Vladimir
>
> Testing: tier1-5 (earlier version with no semantic differences), tier1-2
> (current patch)
>
> Thanks!
>
> /Claes
More information about the hotspot-compiler-dev
mailing list