RFR: 8365265: x86 short forward jump exceeds 8-bit offset in methodHandles_x86.cpp when using Intel APX
Aleksey Shipilev
shade at openjdk.org
Tue Aug 12 08:36:12 UTC 2025
On Tue, 12 Aug 2025 08:03:15 GMT, Andrew Haley <aph at openjdk.org> wrote:
> > Looks good. This is diagnostics code, so performance is not a question.
> > I think we generally avoid shortening branches over `__ STOP`, for example, which size is generally unpredictable. So this looks in alignment with that tactics. Maybe you want to unshorten the branch at L157 as well.
>
> All thi.s long-and-short branch stuff is a pain. I wonder, given that we're now saving stubs in an archive, whether we should just bite the bullet and implement branch relaxation for stubs. I don't think it would be very hard.
Code density still matters for runtime performance, alas. I think a practical guidance is to avoid optimizing for code density in diagnostic code, like this one. Accepting pain for production-side code is a fair trade, accepting pain for diagnostic code is just silly. :)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26731#issuecomment-3178303992
More information about the hotspot-compiler-dev
mailing list