diff mbox series

[v3,09/16] scripts/decodetree: Add support for 48-bit instructions

Message ID 20241126140003.74871-10-philmd@linaro.org (mailing list archive)
State New
Headers show
Series target/mips: Convert nanoMIPS LSA opcode to decodetree | expand

Commit Message

Philippe Mathieu-Daudé Nov. 26, 2024, 1:59 p.m. UTC
Some nanoMIPS instructions are encoded using 48-bit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 scripts/decodetree.py | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Richard Henderson Nov. 26, 2024, 4:27 p.m. UTC | #1
On 11/26/24 07:59, Philippe Mathieu-Daudé wrote:
> Some nanoMIPS instructions are encoded using 48-bit.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   scripts/decodetree.py | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/decodetree.py b/scripts/decodetree.py
> index e8b72da3a97..88cd476d2d3 100644
> --- a/scripts/decodetree.py
> +++ b/scripts/decodetree.py
> @@ -1543,6 +1543,10 @@ def main():
>                   insntype = 'uint64_t'
>                   insnmask = 0xffffffffffffffff
>                   bitop_width = 64
> +            elif insnwidth == 48:
> +                insntype = 'uint64_t'
> +                insnmask = 0xffffffffffff
> +                bitop_width = 64
>               elif insnwidth != 32:
>                   error(0, 'cannot handle insns of width', insnwidth)
>           elif o == '--test-for-error':

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

This is probably simpler than falling back to the variable-length decodetree stuff.


r~
diff mbox series

Patch

diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index e8b72da3a97..88cd476d2d3 100644
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1543,6 +1543,10 @@  def main():
                 insntype = 'uint64_t'
                 insnmask = 0xffffffffffffffff
                 bitop_width = 64
+            elif insnwidth == 48:
+                insntype = 'uint64_t'
+                insnmask = 0xffffffffffff
+                bitop_width = 64
             elif insnwidth != 32:
                 error(0, 'cannot handle insns of width', insnwidth)
         elif o == '--test-for-error':