xref: /openbmc/qemu/target/ppc/meson.build (revision 2b74dd91)
1ppc_ss = ss.source_set()
2ppc_ss.add(files(
3  'cpu-models.c',
4  'cpu.c',
5  'cpu_init.c',
6  'excp_helper.c',
7  'gdbstub.c',
8  'helper_regs.c',
9))
10
11ppc_ss.add(when: 'CONFIG_TCG', if_true: files(
12  'dfp_helper.c',
13  'fpu_helper.c',
14  'int_helper.c',
15  'mem_helper.c',
16  'misc_helper.c',
17  'timebase_helper.c',
18  'translate.c',
19  'power8-pmu.c',
20))
21
22ppc_ss.add(libdecnumber)
23
24gen = [
25  decodetree.process('insn32.decode',
26                     extra_args: '--static-decode=decode_insn32'),
27  decodetree.process('insn64.decode',
28                     extra_args: ['--static-decode=decode_insn64',
29                                  '--insnwidth=64']),
30]
31ppc_ss.add(when: 'CONFIG_TCG', if_true: gen)
32
33ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c'))
34
35ppc_system_ss = ss.source_set()
36ppc_system_ss.add(files(
37  'arch_dump.c',
38  'machine.c',
39  'mmu-hash32.c',
40  'mmu-booke.c',
41  'mmu_common.c',
42  'ppc-qmp-cmds.c',
43))
44ppc_system_ss.add(when: 'CONFIG_TCG', if_true: files(
45  'mmu_helper.c',
46), if_false: files(
47  'tcg-stub.c',
48))
49ppc_system_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
50
51ppc_system_ss.add(when: 'TARGET_PPC64', if_true: files(
52  'compat.c',
53  'mmu-book3s-v3.c',
54  'mmu-hash64.c',
55  'mmu-radix64.c',
56))
57
58target_arch += {'ppc': ppc_ss}
59target_system_arch += {'ppc': ppc_system_ss}
60