[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/8] decodetree: Allow group covering the entire insn space
From: |
Peter Maydell |
Subject: |
Re: [PATCH 5/8] decodetree: Allow group covering the entire insn space |
Date: |
Tue, 2 Jun 2020 15:35:05 +0100 |
On Mon, 18 May 2020 at 17:41, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> This is an edge case for sure, but the logic that disallowed
> this case was faulty. Further, a few fixes scattered about
> can allow this to work.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> ...est1.decode => succ_pattern_group_nest2.decode} | 2 +-
> scripts/decodetree.py | 14 +++++++++++---
> 2 files changed, 12 insertions(+), 4 deletions(-)
> rename tests/decode/{err_pattern_group_nest1.decode =>
> succ_pattern_group_nest2.decode} (85%)
> @@ -978,6 +980,12 @@ def build_tree(pats, outerbits, outermask):
> innermask &= i.fixedmask
>
> if innermask == 0:
> + # Edge condition: One pattern covers the entire insnmask
> + if len(pats) == 1:
> + t = Tree(outermask, innermask)
> + t.subs.append((0, pats[0]))
> + return t
> +
> text = 'overlapping patterns:'
> for p in pats:
> text += '\n' + p.file + ':' + str(p.lineno) + ': ' + str(p)
I don't really understand this code, but does the similar
looking build_size_tree() also need a change to handle a
length-one pats ?
thanks
-- PMM
- Re: [PATCH 5/8] decodetree: Allow group covering the entire insn space,
Peter Maydell <=