RFR: 8354062: x86: Optimize stores of zero immediates with r12_heapbase
Aleksey Shipilev
shade at openjdk.org
Tue Apr 8 19:21:16 UTC 2025
On Tue, 8 Apr 2025 17:53:29 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> X86 does not have zero register. Except that it does for Hotspot, when compressed oops are enabled and heap base is zero. C2 routinely uses `r12` as zero register then. It makes the code considerably more compact. We can do the same in `MacroAssembler`. This would target the stores of known zeroes, which are surprisingly frequent in C1, mostly for zeroing out various `JavaThread` slots, e.g. for exception handling.
>
> (Kept x86_32 code intact, in case we want to backport it later. I don't mind removing x86_32 parts either.)
>
> Additional testing:
> - [ ] Linux x86_64 server fastdebug, `all`
Test failures. Back to draft.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24519#issuecomment-2787444064
More information about the hotspot-dev
mailing list