[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 1/8] target/avr: Add instruction decoder
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v1 1/8] target/avr: Add instruction decoder |
Date: |
Sun, 5 May 2019 08:49:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/4/19 1:36 AM, Sarah Harris wrote:
> This utility module builds a decision tree to decode instructions, starting
> from a human readable list of instruction bit patterns.
> Automatic tree generation will hopefully be more efficient and more
> maintainable than a hand-designed opcode parser.
>
> Tree generation happens at startup because this seemed simpler to implement
> than adding a new build step.
We have such a thing in qemu already, as a separate build step.
See ./scripts/decodetree.py, and some of the uses in
target/{arm,hppa,riscv}/*.decode
In addition to being able to select the instruction, it also
extracts arguments from the instruction, so there's less
repetition that you have for e.g.
> +static inline uint32_t MOVW_Rr(uint32_t opcode)
> +{
> + return extract32(opcode, 0, 4);
> +}
...
> +static inline uint32_t MULS_Rr(uint32_t opcode)
> +{
> + return extract32(opcode, 0, 4);
> +}
r~
- [Qemu-devel] [PATCH v1 0/8] DRAFT AVR Patches, Sarah Harris, 2019/05/04
- [Qemu-devel] [PATCH v1 7/8] target/avr: Add example board configuration, Sarah Harris, 2019/05/04
- [Qemu-devel] [PATCH v1 4/8] target/avr: Add instruction helpers, Sarah Harris, 2019/05/04
- [Qemu-devel] [PATCH v1 1/8] target/avr: Add instruction decoder, Sarah Harris, 2019/05/04
- Re: [Qemu-devel] [PATCH v1 1/8] target/avr: Add instruction decoder,
Richard Henderson <=
- [Qemu-devel] [PATCH v1 5/8] target/avr: Add instruction translation, Sarah Harris, 2019/05/04
- [Qemu-devel] [PATCH v1 6/8] target/avr: Add limited support for USART and 16 bit timer peripherals, Sarah Harris, 2019/05/04
- [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file, Sarah Harris, 2019/05/04
- Re: [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file, Richard Henderson, 2019/05/05
- Re: [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file, Michael Rolnik, 2019/05/05
- Re: [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file, Sarah Harris, 2019/05/07
- Re: [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file, Sarah Harris, 2019/05/10
- Re: [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file, Eric Blake, 2019/05/06
- [Qemu-devel] [PATCH v1 2/8] target/avr: Add mechanism to check for active debugger connection, Sarah Harris, 2019/05/04