On Wed, 3 Jun 2020 at 02:13, Richard Henderson
<[email protected]> wrote:
>
> Signed-off-by: Richard Henderson <[email protected]>
> ---
> v2: Update to 00eac5.
> Merge choose_random_nonexcluded_tag into helper_irg since
> that pseudo function no longer exists separately.
> v6: Remove obsolete logical/physical tag distinction;
> implement inline for !ATA.
> ---
> +static int choose_nonexcluded_tag(int tag, int offset, uint16_t exclude)
> +{
> + if (exclude == 0xffff) {
> + return 0;
> + }
> + if (offset == 0) {
> + while (exclude & (1 << tag)) {
> + tag = (tag + 1) & 15;
> + }
> + } else {
> + do {
> + do {
> + tag = (tag + 1) & 15;
> + } while (exclude & (1 << tag));
> + } while (--offset > 0);
> + }
Not the way the pseudocode is phrased, but the effect seems to
be the same.
Reviewed-by: Peter Maydell <[email protected]>
thanks
-- PMM