[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] target/arm: Fix AddPAC error indication
From: |
Peter Maydell |
Subject: |
Re: [PATCH] target/arm: Fix AddPAC error indication |
Date: |
Thu, 30 Jul 2020 11:57:02 +0100 |
On Tue, 28 Jul 2020 at 20:57, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The definition of top_bit used in this function is one higher
> than that used in the Arm ARM psuedo-code, which put the error
> indication at top_bit - 1 at the wrong place, which meant that
> it wasn't visible to Auth.
>
> Fixing the definition of top_bit requires more changes, because
> its most common use is for the count of bits in top_bit:bot_bit,
> which would then need to be computed as top_bit - bot_bit + 1.
>
> For now, prefer the minimal fix to the error indication alone.
>
> Fixes: 63ff0ca94cb
> Reported-by: Derrick McKee <derrick.mckee@gmail.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This seems like it might confuse us in future so I've added
a comment inside the if():
/*
* Note that our top_bit is one greater than the pseudocode's
* version, hence "- 2" here.
*/
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
and added to target-arm.next.
thanks
-- PMM