RFR: 8276563: Undefined Behaviour in class Assembler

Mai Đặng Quân Anh duke at openjdk.java.net
Sun Nov 7 07:02:34 UTC 2021


On Sun, 7 Nov 2021 06:49:18 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> The only odd thing was that when using a constant object know at the use site (case B), I would have expected an immediate, but the constant encoding gets loaded from the text segment instead.

I believe to achieve constant folding here you should mark the constructor of the `Register` class as `constexpr`, and maybe the `rxxx` variable too just to make sure.
Cheers.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6280


More information about the hotspot-compiler-dev mailing list