[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 19/21] target/loongarch: Add target build suport
From: |
Song Gao |
Subject: |
[PATCH v6 19/21] target/loongarch: Add target build suport |
Date: |
Fri, 17 Sep 2021 16:12:58 +0800 |
This patch add build loongarch-linux-user target support.
Signed-off-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: XiaoJuan Yang <yangxiaojuan@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
meson.build | 2 +-
target/loongarch/meson.build | 18 ++++++++++++++++++
target/meson.build | 1 +
3 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 target/loongarch/meson.build
diff --git a/meson.build b/meson.build
index 66a5f3c..9e898c6 100644
--- a/meson.build
+++ b/meson.build
@@ -57,7 +57,7 @@ python = import('python').find_installation()
supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin',
'sunos', 'linux']
supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86',
'x86_64',
- 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
+ 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64', 'loongarch64']
cpu = host_machine.cpu_family()
targetos = host_machine.system()
diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build
new file mode 100644
index 0000000..31f9e9f
--- /dev/null
+++ b/target/loongarch/meson.build
@@ -0,0 +1,18 @@
+gen = decodetree.process('insns.decode')
+
+loongarch_ss = ss.source_set()
+loongarch_ss.add(files(
+ 'cpu.c',
+))
+loongarch_tcg_ss = ss.source_set()
+loongarch_tcg_ss.add(gen)
+loongarch_tcg_ss.add(files(
+ 'fpu_helper.c',
+ 'op_helper.c',
+ 'translate.c',
+))
+loongarch_tcg_ss.add(zlib)
+
+loongarch_ss.add_all(when: 'CONFIG_TCG', if_true: [loongarch_tcg_ss])
+
+target_arch += {'loongarch': loongarch_ss}
diff --git a/target/meson.build b/target/meson.build
index 2f69402..a53a604 100644
--- a/target/meson.build
+++ b/target/meson.build
@@ -5,6 +5,7 @@ subdir('cris')
subdir('hexagon')
subdir('hppa')
subdir('i386')
+subdir('loongarch')
subdir('m68k')
subdir('microblaze')
subdir('mips')
--
1.8.3.1
- [PATCH v6 09/21] target/loongarch: Add fixed point extra instruction translation, (continued)
- [PATCH v6 09/21] target/loongarch: Add fixed point extra instruction translation, Song Gao, 2021/09/17
- [PATCH v6 10/21] target/loongarch: Add floating point arithmetic instruction translation, Song Gao, 2021/09/17
- [PATCH v6 11/21] target/loongarch: Add floating point comparison instruction translation, Song Gao, 2021/09/17
- [PATCH v6 12/21] target/loongarch: Add floating point conversion instruction translation, Song Gao, 2021/09/17
- [PATCH v6 13/21] target/loongarch: Add floating point move instruction translation, Song Gao, 2021/09/17
- [PATCH v6 14/21] target/loongarch: Add floating point load/store instruction translation, Song Gao, 2021/09/17
- [PATCH v6 15/21] target/loongarch: Add branch instruction translation, Song Gao, 2021/09/17
- [PATCH v6 18/21] default-configs: Add loongarch linux-user support, Song Gao, 2021/09/17
- [PATCH v6 20/21] target/loongarch: 'make check-tcg' support, Song Gao, 2021/09/17
- [PATCH v6 19/21] target/loongarch: Add target build suport,
Song Gao <=
- [PATCH v6 17/21] LoongArch Linux User Emulation, Song Gao, 2021/09/17
- [PATCH v6 16/21] target/loongarch: Add disassembler, Song Gao, 2021/09/17
- [PATCH v6 21/21] scripts: add loongarch64 binfmt config, Song Gao, 2021/09/17
- Re: [PATCH v6 00/21] Add LoongArch linux-user emulation support, Richard Henderson, 2021/09/20