qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v7 00/35] target/riscv: Convert to decodetree
@ 2019-02-13 15:53 Palmer Dabbelt
  2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 01/35] target/riscv: Move CPURISCVState pointer to DisasContext Palmer Dabbelt
                   ` (49 more replies)
  0 siblings, 50 replies; 58+ messages in thread
From: Palmer Dabbelt @ 2019-02-13 15:53 UTC (permalink / raw)
  To: qemu-riscv; +Cc: qemu-devel

Palmer: I caused some merge conflicts in Bastian's patch set so I
figured I'd attempt to clean these up.  As far as I'm concerned v6 was
good to go, but since the merge conflicts were fairly extensive (if
somewhat mechanical) I'd like to pass the baton back to Bastian here for
at least a sanity check.

Hi,

this patchset converts the RISC-V decoder to decodetree in four major steps:

1) Convert 32-bit instructions to decodetree [Patch 1-16]:
    Many of the gen_* functions are called by the decode functions for 16-bit
    and 32-bit functions. If we move translation code from the gen_*
    functions to the generated trans_* functions of decode-tree, we get a lot of
    duplication. Therefore, we mostly generate calls to the old gen_* function
    which are properly replaced after step 2).

    Each of the trans_ functions are grouped into files corresponding to their
    ISA extension, e.g. addi which is in RV32I is translated in the file
    'trans_rvi.inc.c'.

2) Convert 16-bit instructions to decodetree [Patch 17-19]:
    All 16 bit instructions have a direct mapping to a 32 bit instruction. Thus,
    we convert the arguments in the 16 bit trans_ function to the arguments of
    the corresponding 32 bit instruction and call the 32 bit trans_ function.

3) Remove old manual decoding in gen_* function [Patch 20-30]:
    this move all manual translation code into the trans_* instructions of
    decode tree, such that we can remove the old decode_* functions.

4) Simplify RVC by reusing as much as possible from the RVG decoder as suggested
   by Richard. [Patch 31-35]

full tree available at
https://github.com/palmer-dabbelt/qemu/tree/riscv-dt-v7

Cheers,
Bastian

v6 -> v7:
    - Rebased on top of riscv-for-master-4.0-sf1, which contains a
      refactoring of the original translation code.
    - Added handling of mstatus.fs to the floating-point routines.

v5 -> v6:
    - fixed funky indentation

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2019-02-21 17:24 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-13 15:53 [Qemu-devel] [PATCH v7 00/35] target/riscv: Convert to decodetree Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 01/35] target/riscv: Move CPURISCVState pointer to DisasContext Palmer Dabbelt
2019-02-13 16:18   ` Bastian Koppelmann
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 02/35] target/riscv: Activate decodetree and implemnt LUI & AUIPC Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 03/35] target/riscv: Convert RVXI branch insns to decodetree Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 04/35] target/riscv: Convert RV32I load/store " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 05/35] target/riscv: Convert RV64I " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 06/35] target/riscv: Convert RVXI arithmetic " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 07/35] target/riscv: Convert RVXI fence " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 08/35] target/riscv: Convert RVXI csr " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 09/35] target/riscv: Convert RVXM " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 10/35] target/riscv: Convert RV32A " Palmer Dabbelt
2019-02-15 12:09   ` Bastian Koppelmann
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 11/35] target/riscv: Convert RV64A " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 12/35] target/riscv: Convert RV32F " Palmer Dabbelt
2019-02-15 12:11   ` Bastian Koppelmann
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 13/35] target/riscv: Convert RV64F " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 14/35] target/riscv: Convert RV32D " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 15/35] target/riscv: Convert RV64D " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 16/35] target/riscv: Convert RV priv " Palmer Dabbelt
2019-02-15 12:13   ` Bastian Koppelmann
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 17/35] target/riscv: Convert quadrant 0 of RVXC " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 18/35] target/riscv: Convert quadrant 1 " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 19/35] target/riscv: Convert quadrant 2 " Palmer Dabbelt
2019-02-13 15:53 ` [Qemu-devel] [PATCH v7 20/35] target/riscv: Remove gen_jalr() Palmer Dabbelt
2019-02-15 12:14   ` Bastian Koppelmann
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 21/35] target/riscv: Remove manual decoding from gen_branch() Palmer Dabbelt
2019-02-15 12:15   ` Bastian Koppelmann
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 22/35] target/riscv: Remove manual decoding from gen_load() Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 23/35] target/riscv: Remove manual decoding from gen_store() Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 24/35] target/riscv: Move gen_arith_imm() decoding into trans_* functions Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 25/35] target/riscv: make ADD/SUB/OR/XOR/AND insn use arg lists Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 26/35] target/riscv: Remove shift and slt insn manual decoding Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 27/35] target/riscv: Remove manual decoding of RV32/64M insn Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 28/35] target/riscv: Rename trans_arith to gen_arith Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 29/35] target/riscv: Remove gen_system() Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 30/35] target/riscv: Remove decode_RV32_64G() Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 31/35] target/riscv: Convert @cs_2 insns to share translation functions Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 32/35] target/riscv: Convert @cl_d, @cl_w, @cs_d, @cs_w insns Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 33/35] target/riscv: Splice fsw_sd and flw_ld for riscv32 vs riscv64 Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 34/35] target/riscv: Splice remaining compressed insn pairs " Palmer Dabbelt
2019-02-13 15:54 ` [Qemu-devel] [PATCH v7 35/35] target/riscv: Remaining rvc insn reuse 32 bit translators Palmer Dabbelt
2019-02-15 12:36 ` [Qemu-devel] [PATCH v7 00/35] target/riscv: Convert to decodetree no-reply
2019-02-15 12:40 ` no-reply
2019-02-15 13:07 ` no-reply
2019-02-15 13:11 ` no-reply
2019-02-15 13:13 ` Bastian Koppelmann
2019-02-15 13:38 ` no-reply
2019-02-15 13:42 ` no-reply
2019-02-15 14:11 ` no-reply
2019-02-15 14:42 ` no-reply
2019-02-15 15:14 ` no-reply
2019-02-15 15:45 ` no-reply
2019-02-15 16:39 ` no-reply
2019-02-15 16:42 ` no-reply
2019-02-15 17:11 ` no-reply
2019-02-20 17:02 ` Bastian Koppelmann
2019-02-21 17:23   ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).