RFR: JDK-8261552: s390: MacroAssembler::encode_klass_not_null() may produce wrong results for non-zero values of narrow klass base

Thomas Stuefe stuefe at openjdk.java.net
Thu Feb 18 05:34:41 UTC 2021


On Wed, 17 Feb 2021 15:58:49 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:

> I do not like the cross-dependency to metaspace.hpp just for the sake of checking an artificial restriction on Klass pointers.

It is not just for the assertion, it is for limiting the 32bit add to situations where we know Klass pointers cannot exceed 32bit. That was the main reason. As I wrote, I was not sure about the assertion myself and am happy to drop it.

> And by the way, you could do the check with one test:
> 
> ```
>   z_oihf(current, 0);
>   z_brc(Assembler::bcondZero, ok);
> ```
> 
> z_oihf() does modify the contents of register current, but it writes back the same value.

Thank you. Unfortunately, information about z assembly was hard to come by. The only public information I found had hardly more than the instruction names, the rest was trial and error.

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

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


More information about the hotspot-dev mailing list