mbox series

[v2,00/22] Add LoongArch linux-user emulation support

Message ID 1626861198-6133-1-git-send-email-gaosong@loongson.cn
Headers show
Series Add LoongArch linux-user emulation support | expand

Message

Song Gao July 21, 2021, 9:52 a.m. UTC
Hi,

This series only adds linux-user emulation support for LoongArch.
So there is no introduction of system in docs/system directory,
We'll add that in a future series.

Changes for v1:
  * Patch 1, remove unnecessary introduction;
  * Patch 3, follow the ARM/AVR pattern to add new CPU features;
  * Patch 6, remove decode_lsx(); 
  * Patches 7-18, delete opcode definition, modify translation function;
  * Patches 20-22, split V1 patch20 to V2 patch20-22. 

In the next series, we will add privileged instruction emulation, 
board emulation and TCG test. Please review.

Regards
Song Gao

Song Gao (22):
  target/loongarch: Add README
  target/loongarch: Add CSR registers definition
  target/loongarch: Add core definition
  target/loongarch: Add interrupt handling support
  target/loongarch: Add memory management support
  target/loongarch: Add main translation routines
  target/loongarch: Add fixed point arithmetic instruction translation
  target/loongarch: Add fixed point shift instruction translation
  target/loongarch: Add fixed point bit instruction translation
  target/loongarch: Add fixed point load/store instruction translation
  target/loongarch: Add fixed point atomic instruction translation
  target/loongarch: Add fixed point extra instruction translation
  target/loongarch: Add floating point arithmetic instruction
    translation
  target/loongarch: Add floating point comparison instruction
    translation
  target/loongarch: Add floating point conversion instruction
    translation
  target/loongarch: Add floating point move instruction translation
  target/loongarch: Add floating point load/store instruction
    translation
  target/loongarch: Add branch instruction translation
  target/loongarch: Add disassembler
  LoongArch Linux User Emulation
  configs: Add loongarch linux-user config
  target/loongarch: Add target build suport

 MAINTAINERS                                |    7 +
 configs/targets/loongarch64-linux-user.mak |    3 +
 disas/loongarch.c                          | 2511 +++++++++++++
 disas/meson.build                          |    1 +
 include/disas/dis-asm.h                    |    2 +
 include/elf.h                              |    2 +
 linux-user/elfload.c                       |   58 +
 linux-user/loongarch64/cpu_loop.c          |  177 +
 linux-user/loongarch64/signal.c            |  193 +
 linux-user/loongarch64/sockbits.h          |    1 +
 linux-user/loongarch64/syscall_nr.h        |  307 ++
 linux-user/loongarch64/target_cpu.h        |   36 +
 linux-user/loongarch64/target_elf.h        |   14 +
 linux-user/loongarch64/target_fcntl.h      |   12 +
 linux-user/loongarch64/target_signal.h     |   28 +
 linux-user/loongarch64/target_structs.h    |   49 +
 linux-user/loongarch64/target_syscall.h    |   46 +
 linux-user/loongarch64/termbits.h          |  229 ++
 linux-user/syscall_defs.h                  |   10 +-
 meson.build                                |    1 +
 target/loongarch/README                    |    5 +
 target/loongarch/cpu-csr.h                 |  724 ++++
 target/loongarch/cpu-param.h               |   21 +
 target/loongarch/cpu-qom.h                 |   40 +
 target/loongarch/cpu.c                     |  319 ++
 target/loongarch/cpu.h                     |  299 ++
 target/loongarch/fpu_helper.c              | 1435 +++++++
 target/loongarch/fpu_helper.h              |   34 +
 target/loongarch/helper.h                  |  158 +
 target/loongarch/insns.decode              |  480 +++
 target/loongarch/meson.build               |   19 +
 target/loongarch/op_helper.c               |  230 ++
 target/loongarch/tlb_helper.c              |  103 +
 target/loongarch/trans.inc.c               | 5536 ++++++++++++++++++++++++++++
 target/loongarch/translate.c               |  558 +++
 target/loongarch/translate.h               |   50 +
 target/meson.build                         |    1 +
 37 files changed, 13695 insertions(+), 4 deletions(-)
 create mode 100644 configs/targets/loongarch64-linux-user.mak
 create mode 100644 disas/loongarch.c
 create mode 100644 linux-user/loongarch64/cpu_loop.c
 create mode 100644 linux-user/loongarch64/signal.c
 create mode 100644 linux-user/loongarch64/sockbits.h
 create mode 100644 linux-user/loongarch64/syscall_nr.h
 create mode 100644 linux-user/loongarch64/target_cpu.h
 create mode 100644 linux-user/loongarch64/target_elf.h
 create mode 100644 linux-user/loongarch64/target_fcntl.h
 create mode 100644 linux-user/loongarch64/target_signal.h
 create mode 100644 linux-user/loongarch64/target_structs.h
 create mode 100644 linux-user/loongarch64/target_syscall.h
 create mode 100644 linux-user/loongarch64/termbits.h
 create mode 100644 target/loongarch/README
 create mode 100644 target/loongarch/cpu-csr.h
 create mode 100644 target/loongarch/cpu-param.h
 create mode 100644 target/loongarch/cpu-qom.h
 create mode 100644 target/loongarch/cpu.c
 create mode 100644 target/loongarch/cpu.h
 create mode 100644 target/loongarch/fpu_helper.c
 create mode 100644 target/loongarch/fpu_helper.h
 create mode 100644 target/loongarch/helper.h
 create mode 100644 target/loongarch/insns.decode
 create mode 100644 target/loongarch/meson.build
 create mode 100644 target/loongarch/op_helper.c
 create mode 100644 target/loongarch/tlb_helper.c
 create mode 100644 target/loongarch/trans.inc.c
 create mode 100644 target/loongarch/translate.c
 create mode 100644 target/loongarch/translate.h