summaryrefslogtreecommitdiffstats
path: root/tests/decode
Commit message (Collapse)AuthorAgeFilesLines
* decodetree: Improve identifier matchingRichard Henderson2020-09-141-0/+7
| | | | | | | | | | | | | | | | Only argument set members have to be C identifiers, everything else gets prefixed during conversion to C. Some places just checked the leading character, and some places matched a leading character plus a C identifier. Convert everything to match full identifiers, including the [&%@&] prefix, and drop the full C identifier requirement. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20200903192334.1603773-1-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* decodetree: Drop check for less than 2 patterns in a groupRichard Henderson2020-06-091-0/+13
| | | | | | | | | | | | While it makes little sense for the end product to have a group containing only a single pattern, avoiding this case within an incremental patch set is troublesome. Because this is expected to be a transient condition, do not bother "optimizing" this case, e.g. by folding away the group. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tests/decode: Test non-overlapping groupsRichard Henderson2020-06-084-0/+45
| | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* decodetree: Allow group covering the entire insn spaceRichard Henderson2020-06-081-1/+1
| | | | | | | | | 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. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* decodetree: Allow !function with no input bitsRichard Henderson2019-08-192-0/+11
| | | | | | | | Call this form a "parameter", returning a value extracted from the DisasContext. Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* decodetree: Properly diagnose fields overflowing an insnRichard Henderson2019-03-124-0/+20
| | | | | | | Previously this would result in an exception for shifting the field mask by a negative number. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* test/decode: Add tests for PatternGroupsBastian Koppelmann2019-03-126-0/+68
| | | | | | | | | | This adds one test that supposed to succeed to test deep nesting of pattern groups which is rarely exercised by targets using decode tree. The remaining tests exercise various fail conditions. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-Id: <20190227120217.20794-1-kbastian@mail.uni-paderborn.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* decodetree: Allow grouping of overlapping patternsRichard Henderson2019-03-121-0/+6
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* scripts: Add decodetree.pyRichard Henderson2018-02-2321-0/+132
To be used to decode ARM SVE, but could be used for any fixed-width ISA. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>