On 02/11/2022 08:52, Michal Orzel wrote:
/* N-bit register helpers */
#define VREG_REG_HELPERS(sz, offmask) \
static inline register_t vreg_reg##sz##_extract(uint##sz##_t reg, \
const mmio_info_t *info)\
{ \
- return vreg_reg_extract(reg, info->gpa & (offmask), \
- info->dabt.size); \
+ unsigned int offset = info->gpa & (offmask); \
In all the other helpers you are also defining the variables to store shift and
mask,
no matter the number of uses. I know that this is a left over from the removed
helpers,
but since you are modifying the file you could improve consistency and define
them
here as well.
Nack. We don't define extra local variable just for consistency. They
are added in some places below to reduce the number of operation in one
line.
This is not necessary here.
Cheers,
--
Julien Grall