RFR: JDK-8287288: Fix some typos in C1
Zhuojun Miao
zmiao at openjdk.java.net
Thu May 26 03:39:41 UTC 2022
On Thu, 26 May 2022 02:47:54 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> According to the definitions of `Opr_kind` and `kind_mask` below, it can be seen that `opr-kind` uses the lowest 3 bits, and if the lowest bit is 0, it means that this is a pointer.
>
> I was reading:
>
> enum OprBits {
> pointer_bits = 1
> , kind_bits = 3
> , type_bits = 4
> , size_bits = 2
> , destroys_bits = 1
>
> as a bitfield description so 1 pointer bit followed by 3 kind bits, followed by 4 type bits etc. But I agree the later mask value only does a shift of 3 not 4.
>
> Also the code indicates there are a lot more non-data bits before we get to the data so the diagram is incomplete in other ways.
I don't think `pointer_bits` should be added to `non_data_bits`:
, non_data_bits = pointer_bits + kind_bits + type_bits + size_bits + destroys_bits + virtual_bits
+ is_xmm_bits + last_use_bits + is_fpu_stack_offset_bits
, data_bits = BitsPerInt - non_data_bits
, reg_bits = data_bits / 2 // for two registers in one value encoding
-------------
PR: https://git.openjdk.java.net/jdk/pull/8880
More information about the hotspot-compiler-dev
mailing list