RFR: JDK-8287288: Fix some typos in C1
Dean Long
dlong at openjdk.java.net
Thu May 26 22:12:27 UTC 2022
On Thu, 26 May 2022 03:36:11 GMT, Zhuojun Miao <zmiao at openjdk.org> wrote:
>> 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
I agree. This was changed as part of JDK-8261235.
@chhagedorn, I think there must be a different issue with vreg_max in JDK-8261235. I wounder if it should be using reg_bits instead of data_bits.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8880
More information about the hotspot-compiler-dev
mailing list