@samitouri / QOSamiQemu / commits / 4b1f226fec

docs/devel/decodetree: Fix formatting in "field examples" table

The rST syntax for a table uses ASCII art to draw the cell boundaries; then inside each cell the text is treated as a body element, so it is rendered the same way as text at the top level of a document. The "field examples" table was assuming a "literal document" format for its cell bodies; this meant that the single line cells were being rendered in plain text, not a fixed width font, and the multi line cells were rendered as definition-lists because of their "second and subsequent lines are indented" layout. Fix this by consistently using inline-code markup for the left column and literal blocks for the right column. (We want to be consistent within each column because a literal block renders differently to inline-code, with a green background.) Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Peter Maydell committed May 5, 2026 at 09:25 UTC 4b1f226feca1d8fa3ba95ea1da9398c70dc26c98
1 file changed +27 -17
docs/devel/decodetree.rst
+27 -17
@@ -64,23 +64,33 @@ A field with no ``fields`` and no ``!function`` is in error.
64
65 Field examples:
66
67 -+---------------------------+---------------------------------------------+
68 -| Input | Generated code |
69 -+===========================+=============================================+
70 -| %disp 0:s16 | sextract(i, 0, 16) |
71 -+---------------------------+---------------------------------------------+
72 -| %imm9 16:6 10:3 | extract(i, 16, 6) << 3 | extract(i, 10, 3) |
73 -+---------------------------+---------------------------------------------+
74 -| %disp12 0:s1 1:1 2:10 | sextract(i, 0, 1) << 11 | |
75 -| | extract(i, 1, 1) << 10 | |
76 -| | extract(i, 2, 10) |
77 -+---------------------------+---------------------------------------------+
78 -| %shimm8 5:s8 13:1 | expand_shimm8(sextract(i, 5, 8) << 1 | |
79 -| !function=expand_shimm8 | extract(i, 13, 1)) |
80 -+---------------------------+---------------------------------------------+
81 -| %sz_imm 10:2 sz:3 | expand_sz_imm(extract(i, 10, 2) << 3 | |
82 -| !function=expand_sz_imm | extract(a->sz, 0, 3)) |
83 -+---------------------------+---------------------------------------------+
67 ++-----------------------------+----------------------------------------------+
68 +| Input | Generated code |
69 ++=============================+==============================================+
70 +| ``%disp 0:s16`` | :: |
71 +| | |
72 +| | sextract(i, 0, 16) |
73 ++-----------------------------+----------------------------------------------+
74 +| ``%imm9 16:6 10:3`` | :: |
75 +| | |
76 +| | extract(i, 16, 6) << 3 | extract(i, 10, 3) |
77 ++-----------------------------+----------------------------------------------+
78 +| ``%disp12 0:s1 1:1 2:10`` | :: |
79 +| | |
80 +| | sextract(i, 0, 1) << 11 | |
81 +| | extract(i, 1, 1) << 10 | |
82 +| | extract(i, 2, 10) |
83 ++-----------------------------+----------------------------------------------+
84 +| ``%shimm8 5:s8 13:1 | :: |
85 +| !function=expand_shimm8`` | |
86 +| | expand_shimm8(sextract(i, 5, 8) << 1 | |
87 +| | extract(i, 13, 1)) |
88 ++-----------------------------+----------------------------------------------+
89 +| ``%sz_imm 10:2 sz:3 | :: |
90 +| !function=expand_sz_imm`` | |
91 +| | expand_sz_imm(extract(i, 10, 2) << 3 | |
92 +| | extract(a->sz, 0, 3)) |
93 ++-----------------------------+----------------------------------------------+
94
95 Argument Sets
96 =============