On 11/10/21 3:26 PM, LIU Zhiwei wrote:
One question here. Even come before patch 6, we don't have a simple way to choose vill and reserved fields from s2 register in patch 6.
You can certainly split out vill before you create a new way to select it based on xlen. In fact, you *should* do that as a separate patch before extending helper_vsetvl to handle multiple xlen.
Note that vill is always at the msb, so it's easy to find without necessarily defining an XLEN32 field.
As for the reserved "field"... how about reserved = MAKE_64BIT_MASK(R_VTYPE_RESERVED_START, xlen - 1 - R_VTYPE_RESERVED_START); reserved &= s2;
As env->vill will be used in read_vtype, we still need to covert env->vill type to target_ulong there.
A cast in read_vtype will do. Explicit casts to uint32_t/uint64_t would remove the need for an ifdef in that function as well.
Is there any benefit to use bool instead of target_ulong?
Self-documentation? r~