RFR: 8311180: Remove unused unneeded definitions from globalDefinitions [v2]
Thomas Stuefe
stuefe at openjdk.org
Sat Jul 1 10:57:56 UTC 2023
On Fri, 30 Jun 2023 19:24:01 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> I noticed this cleanup in a patch that Axel shared with me that I thought should be pushed on its own as trivial.
>> Tested with tier1 on Oracle supported platforms and looked for these on the others.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix ppc
src/hotspot/cpu/ppc/icache_ppc.hpp line 47:
> 45: // Align start address to an icache line boundary and transform
> 46: // nbytes to an icache line count.
> 47: const uint line_offset = (intptr_t)start & (line_size - 1);
Drive by comment: This used to be a `uintptr_t` cast, now its `intptr_t`- why signed? Was that a deliberate decision?
Side question, I always wondered about the widespread use of `intptr_t` in hotspot when casting pointers to integrals, e.g. in `p2i()`. Why a signed integer? E.g. if you then use it for bitwise ops (the major reason why one converts a pointer to an int) it seems more hassle to have to remember the rules for using bitwise operators on signed integers.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14737#discussion_r1248769957
More information about the hotspot-dev
mailing list