mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
Break out documentation to docs/devel/.
Add support for pattern groups. Other misc cleanups for multiple decode functions. -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJch+V5AAoJEGTfOOivfiFfsFsH/1KW6UWAiieZ1+HPYEp24Ku8 hCNxlfj0iKe1ZEuC8qp2U27GzePi71IlIJ7p5AuAhiTQBBWz8bPzJJUALm3EliaI V4/13fLnTYALnPWoUJclU5frdHBhpIWxFUtnLdB50dSU1cTbFFyS+63JsW3wSSXt UqntlhSsAmAQr3ULnKufwDZQJgQoft/8G4YzvMOm/7E0ZeV3B9mARAkn6m/30gLx nXgLI2OQrA1ATLeTfzNRup9G+YjLx0nW2LRhAseIWcQAW8PyfJsfW6tJeou93+bf fK6BkLMgor74QH37Y3u7KVJGJ04u2Gtu0p2JzBA9MU/0l07WihWPA0eJGnP396I= =BxBC -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/rth/tags/pull-dt-20190312' into staging Break out documentation to docs/devel/. Add support for pattern groups. Other misc cleanups for multiple decode functions. # gpg: Signature made Tue 12 Mar 2019 16:59:37 GMT # gpg: using RSA key 64DF38E8AF7E215F # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-dt-20190312: decodetree: Properly diagnose fields overflowing an insn decodetree: Prefix extract function names with decode_function decodetree: Allow +- to begin a number initializing a field decodetree: Produce clean output for an empty input file decodetree: Add --static-decode option test/decode: Add tests for PatternGroups decodetree: Allow grouping of overlapping patterns decodetree: Do not unconditionaly return from Pattern.output_code decodetree: Ensure build_tree does not include values outside insnmask decodetree: Document the usefulness of argument sets decodetree: Move documentation to docs/devel/decodetree.rst MAINTAINERS: Add scripts/decodetree.py to the TCG section Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
f39901d59f
15 changed files with 483 additions and 169 deletions
|
@ -15,4 +15,10 @@ for i in err_*.decode; do
|
|||
fi
|
||||
done
|
||||
|
||||
for i in succ_*.decode; do
|
||||
if ! $PYTHON $DECODETREE $i > /dev/null 2> /dev/null; then
|
||||
echo FAIL:$i 1>&2
|
||||
fi
|
||||
done
|
||||
|
||||
exit $E
|
||||
|
|
6
tests/decode/err_pattern_group_empty.decode
Normal file
6
tests/decode/err_pattern_group_empty.decode
Normal file
|
@ -0,0 +1,6 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
# empty groups are not allowed
|
||||
{
|
||||
}
|
10
tests/decode/err_pattern_group_ident1.decode
Normal file
10
tests/decode/err_pattern_group_ident1.decode
Normal file
|
@ -0,0 +1,10 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
%sub1 0:8
|
||||
|
||||
# Make sure that indentation is enforced
|
||||
{
|
||||
top 00000000 00000000 00000000 00000000
|
||||
sub1 00000000 00000000 00000000 ........ %sub1
|
||||
}
|
11
tests/decode/err_pattern_group_ident2.decode
Normal file
11
tests/decode/err_pattern_group_ident2.decode
Normal file
|
@ -0,0 +1,11 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
%sub1 0:8
|
||||
|
||||
# Make sure that indentation is enforced
|
||||
{
|
||||
top 00000000 00000000 00000000 00000000
|
||||
sub1 00000000 00000000 00000000 ........ %sub1
|
||||
# comments are suposed to be indented
|
||||
}
|
13
tests/decode/err_pattern_group_nest1.decode
Normal file
13
tests/decode/err_pattern_group_nest1.decode
Normal file
|
@ -0,0 +1,13 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
%sub1 0:8
|
||||
%sub2 8:8
|
||||
%sub3 16:8
|
||||
%sub4 24:8
|
||||
|
||||
# Groups with no overlap are supposed to fail
|
||||
{
|
||||
top 00000000 00000000 00000000 00000000
|
||||
sub4 ........ ........ ........ ........ %sub1 %sub2 %sub3 %sub4
|
||||
}
|
6
tests/decode/err_pattern_group_overlap1.decode
Normal file
6
tests/decode/err_pattern_group_overlap1.decode
Normal file
|
@ -0,0 +1,6 @@
|
|||
one 00000000000000000000000000000000
|
||||
{
|
||||
two 0000000000000000000000000000000 s:1
|
||||
three 000000000000000000000000000000 s:1 0
|
||||
}
|
||||
|
5
tests/decode/err_width1.decode
Normal file
5
tests/decode/err_width1.decode
Normal file
|
@ -0,0 +1,5 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
# Diagnose too many bits (33 of 32)
|
||||
one 000000000000000000000000000000000
|
5
tests/decode/err_width2.decode
Normal file
5
tests/decode/err_width2.decode
Normal file
|
@ -0,0 +1,5 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
# Diagnose too few bits (31 of 32)
|
||||
one 0000000000000000000000000000000
|
5
tests/decode/err_width3.decode
Normal file
5
tests/decode/err_width3.decode
Normal file
|
@ -0,0 +1,5 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
# Diagnose too many bits (33 of 32)
|
||||
one 0 s:32
|
5
tests/decode/err_width4.decode
Normal file
5
tests/decode/err_width4.decode
Normal file
|
@ -0,0 +1,5 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
# Diagnose too few bits (31 of 32)
|
||||
one 0 s:30
|
22
tests/decode/succ_pattern_group_nest1.decode
Normal file
22
tests/decode/succ_pattern_group_nest1.decode
Normal file
|
@ -0,0 +1,22 @@
|
|||
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
|
||||
# See the COPYING.LIB file in the top-level directory.
|
||||
|
||||
%sub1 0:8
|
||||
%sub2 8:8
|
||||
%sub3 16:8
|
||||
%sub4 24:7
|
||||
|
||||
# Make sure deep netsting works, as few targets will actually exercise it
|
||||
{
|
||||
top 00000000 00000000 00000000 00000000
|
||||
{
|
||||
sub1 00000000 00000000 00000000 ........ %sub1
|
||||
{
|
||||
sub2 00000000 00000000 ........ ........ %sub1 %sub2
|
||||
{
|
||||
sub3 00000000 ........ ........ ........ %sub1 %sub2 %sub3
|
||||
sub4 0....... ........ ........ ........ %sub1 %sub2 %sub3 %sub4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue