qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 32/45] target/arm: Add arm_tlb_bti_gp


From: Peter Maydell
Subject: Re: [PATCH v8 32/45] target/arm: Add arm_tlb_bti_gp
Date: Thu, 25 Jun 2020 13:29:35 +0100

On Tue, 23 Jun 2020 at 20:37, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Introduce an lvalue macro to wrap target_tlb_bit0.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> +/* Helper for the macros below, validating the argument type. */
> +static inline MemTxAttrs *typecheck_memtxattrs(MemTxAttrs *x)
> +{
> +    return x;
> +}
> +
> +/*
> + * Lvalue macros for ARM TLB bits that we must cache in the TCG TLB.
> + * Using these should be a bit more self-documenting than using the
> + * generic target bits directly.
> + */
> +#define arm_tlb_bti_gp(x) (typecheck_memtxattrs(x)->target_tlb_bit0)

It seems unlikely that we wouldn't get a compile failure if
we passed something other than a MemTxAttrs* to this macro,
given the specificity of the field name, but I guess it
gives us a less confusing compiler error ?

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]