[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/20] target/loongarch: Add main translation routines
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 06/20] target/loongarch: Add main translation routines |
Date: |
Mon, 28 Jun 2021 20:46:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 6/28/21 2:04 PM, Song Gao wrote:
> This patch add main translation routines and
> basic functions for translation.
>
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
> target/loongarch/helper.h | 10 +
> target/loongarch/op_helper.c | 28 +++
> target/loongarch/translate.c | 537
> +++++++++++++++++++++++++++++++++++++++++++
> target/loongarch/translate.h | 58 +++++
> 4 files changed, 633 insertions(+)
> create mode 100644 target/loongarch/helper.h
> create mode 100644 target/loongarch/op_helper.c
> create mode 100644 target/loongarch/translate.c
> create mode 100644 target/loongarch/translate.h
> +/* 128 and 256 msa vector instructions are not supported yet */
> +static bool decode_lsx(uint32_t opcode)
> +{
> + uint32_t value = (opcode & 0xff000000);
> +
> + if ((opcode & 0xf0000000) == 0x70000000) {
> + return true;
> + } else if ((opcode & 0xfff00000) == 0x38400000) {
> + return true;
> + } else {
> + switch (value) {
> + case 0x09000000:
> + case 0x0a000000:
> + case 0x0e000000:
> + case 0x0f000000:
> + case 0x2c000000:
> + case 0x30000000:
> + case 0x31000000:
> + case 0x32000000:
> + case 0x33000000:
> + return true;
> + }
> + }
> + return false;
> +}
Why not generate that with the decodetree script?
- [PATCH 14/20] target/loongarch: Add floating point comparison instruction translation, (continued)
- [PATCH 14/20] target/loongarch: Add floating point comparison instruction translation, Song Gao, 2021/06/28
- [PATCH 13/20] target/loongarch: Add floating point arithmetic instruction translation, Song Gao, 2021/06/28
- [PATCH 20/20] target/loongarch: Add linux-user emulation support, Song Gao, 2021/06/28
- [PATCH 18/20] target/loongarch: Add branch instruction translation, Song Gao, 2021/06/28
- [PATCH 16/20] target/loongarch: Add floating point move instruction translation, Song Gao, 2021/06/28
- [PATCH 17/20] target/loongarch: Add floating point load/store instruction translation, Song Gao, 2021/06/28
- [PATCH 19/20] target/loongarch: Add disassembler, Song Gao, 2021/06/28
- [PATCH 05/20] target/loongarch: Add memory management support, Song Gao, 2021/06/28
- [PATCH 06/20] target/loongarch: Add main translation routines, Song Gao, 2021/06/28
- Re: [PATCH 06/20] target/loongarch: Add main translation routines,
Philippe Mathieu-Daudé <=