RFR: 8276563: Undefined Behaviour in class Assembler
Thomas Stuefe
stuefe at openjdk.java.net
Sat Nov 6 17:18:31 UTC 2021
On Sat, 6 Nov 2021 16:15:44 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> It's not clear to me why `Register` is implemented as a pointer in the first place, instead of a class with a single `int` or `intptr_t` field for the encoding. There is a comment about that in register.hpp, but it doesn't offer an explanation:
I believe the point is to encode the register number in the `this` pointer. If it were a member, you'd have to dereference the pointer to access the member value, so one more load instruction.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6280
More information about the hotspot-compiler-dev
mailing list