On Tue, 28 Jul 2020 at 20:57, Richard Henderson <richard.hender...@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.mc...@gmail.com> > Signed-off-by: Richard Henderson <richard.hender...@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.mayd...@linaro.org> and added to target-arm.next. thanks -- PMM