Skip to content

RFC decodetree: Add tokens to ease checking ISA flags

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11MAINTAINERS: Add scripts/decodetree.py to the TCG sectionMAINTAINERS+1 -00 replies
2/11decodetree: Add multiple include guardscripts/decodetree.py+5 -02 replies
3/11target/mips: Move the !ISA_MIPS32R6 check out of decode_opc_special2_legacytarget/mips/translate.c+1 -21 reply
4/11target/mips: Avoid access to CPUMIPSState from decode* functionstarget/mips/translate.c+2 -21 reply
5/11decodetree: Force Python to print unsigned valuesscripts/decodetree.py+2 -27 replies
6/11scripts/decodetree: Allow empty specificationsscripts/decodetree.py+7 -61 reply
7/11scripts/decodetree: Add add_func_check()scripts/decodetree.py+20 -41 reply
8/11target/mips: Add a decodetree stubtarget/mips/Makefile.objs target/mips/insns.decode target/mips/translate.c +1 more+30 -04 replies
9/11target/mips: Port SYNCI to decodetreetarget/mips/insns.decode target/mips/translate.c target/mips/translate.inc.c+15 -60 replies
10/11scripts/decodetree: Add add_cond_check()scripts/decodetree.py+20 -40 replies
11/11target/mips: Port MIPS64 DCL[Z/O] to decodetreetarget/mips/insns.decode target/mips/translate.inc.c+24 -02 replies

Reviews trailers per patch

4 of 11 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonEduardo Habkost
1/11
2/11
3/11R-b
4/11R-b
5/11R-b R-b
6/11R-b
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [RFC PATCH 00/11] decodetree: Add tokens to ease checking ISA flags

Hi Richard,

I have been wondering how we can simplify when dealing with multiple ISAs. I used the MIPS arch because it aims to be simple, but handling the multiple ISAs/ASEs as once is a mess, with the particular case of the MIPS32R6.

First I wanted to split the translate.c in various ISA/ASE-related files, but this there are too many inlined func involved, I found it handy to use the ?cond token, so we can link all translate functions without worrying about #ifdef'ry.
The translating functions are now smaller/easier to read.

Then I wanted to add stricter ISA check, to not deal with multiple specifications included more than once, and ease overlapping patterns.

I'm not super happy with this series (in particular the token added are MIPS oriented, you can not use spaces in the condition), but I'm interested by what you think :)

Rebasing decodetree specs is painful, so better figure what's the best now before continuing.

At some point I'd like to get to the one ISA/ASE per file, so we can share compilation units between targets (via $common-obj) and also be able to disable completely some ISAs, for whatever reason (downstream/obsolete/...).

Regards,

Phil.

Philippe Mathieu-Daudé (11):
MAINTAINERS: Add scripts/decodetree.py to the TCG section
decodetree: Add multiple include guard
target/mips: Move the !ISA_MIPS32R6 check out of
decode_opc_special2_legacy
target/mips: Avoid access to CPUMIPSState from decode* functions
decodetree: Force Python to print unsigned values scripts/decodetree: Allow empty specifications scripts/decodetree: Add add_func_check()
target/mips: Add a decodetree stub
target/mips: Port SYNCI to decodetree scripts/decodetree: Add add_cond_check()
target/mips: Port MIPS64 DCL[Z/O] to decodetree

 MAINTAINERS                 |  1 +
 scripts/decodetree.py       | 62 ++++++++++++++++++++++++++++++-------
 target/mips/Makefile.objs   |  8 +++++
 target/mips/insns.decode    | 22 +++++++++++++
 target/mips/translate.c     | 20 ++++++------
 target/mips/translate.inc.c | 32 +++++++++++++++++++
 6 files changed, 123 insertions(+), 22 deletions(-)
 create mode 100644 target/mips/insns.decode
 create mode 100644 target/mips/translate.inc.c
Signature · 1 line
2.17.2