diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-03-05 15:34:41 -0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-03-12 09:46:58 -0700 |
commit | 2decfc95583dc28add69810eaca6ada7b4b44d3a (patch) | |
tree | 718b5b36ee3787742d9c30f344922f2bc802ae44 /tests/decode | |
parent | 71ecf79bf40db20237a3cfc01cc407cc4cad8817 (diff) |
decodetree: Properly diagnose fields overflowing an insn
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>
Diffstat (limited to 'tests/decode')
-rw-r--r-- | tests/decode/err_width1.decode | 5 | ||||
-rw-r--r-- | tests/decode/err_width2.decode | 5 | ||||
-rw-r--r-- | tests/decode/err_width3.decode | 5 | ||||
-rw-r--r-- | tests/decode/err_width4.decode | 5 |
4 files changed, 20 insertions, 0 deletions
diff --git a/tests/decode/err_width1.decode b/tests/decode/err_width1.decode new file mode 100644 index 0000000000..0c14f6d73b --- /dev/null +++ b/tests/decode/err_width1.decode @@ -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 diff --git a/tests/decode/err_width2.decode b/tests/decode/err_width2.decode new file mode 100644 index 0000000000..47f0acf322 --- /dev/null +++ b/tests/decode/err_width2.decode @@ -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 diff --git a/tests/decode/err_width3.decode b/tests/decode/err_width3.decode new file mode 100644 index 0000000000..c5fb6b3699 --- /dev/null +++ b/tests/decode/err_width3.decode @@ -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 diff --git a/tests/decode/err_width4.decode b/tests/decode/err_width4.decode new file mode 100644 index 0000000000..1588a63698 --- /dev/null +++ b/tests/decode/err_width4.decode @@ -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 |