• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2020 Google, Inc
2
3# Permission is hereby granted, free of charge, to any person obtaining a copy
4# of this software and associated documentation files (the "Software"), to deal
5# in the Software without restriction, including without limitation the rights
6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7# copies of the Software, and to permit persons to whom the Software is
8# furnished to do so, subject to the following conditions:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19# SOFTWARE.
20
21isa_depend_files = [
22  'ir3-common.xml',
23  'ir3-cat0.xml',
24  'ir3-cat1.xml',
25  'ir3-cat2.xml',
26  'ir3-cat3.xml',
27  'ir3-cat4.xml',
28  'ir3-cat5.xml',
29  'ir3-cat6.xml',
30  'ir3-cat7.xml',
31  isaspec_py_deps
32]
33
34ir3_isa = custom_target(
35  'ir3-isa',
36  input: ['ir3.xml'],
37  output: ['ir3-isa.c', 'ir3-isa.h'],
38  command: [
39    prog_isaspec_decode, '--xml', '@INPUT@',
40    '--out-c', '@OUTPUT0@', '--out-h', '@OUTPUT1@',
41  ],
42  depend_files: isa_depend_files,
43)
44
45decode_files = [
46  ir3_isa,
47  'isa.h',
48]
49
50libir3decode = static_library(
51  'ir3decode',
52  decode_files,
53  dependencies: [idep_mesautil, idep_isaspec_decode],
54  include_directories: [
55    inc_include,
56    inc_src,
57  ],
58  gnu_symbol_visibility: 'hidden',
59)
60
61ir3disasm = executable(
62  'ir3-disasm',
63  ['ir3-disasm.c'],
64  link_with: libir3decode,
65  build_by_default: with_tools.contains('freedreno'),
66  include_directories: [
67    inc_src,
68  ],
69  install: false,
70)
71
72encode_h = custom_target(
73  'encode.h',
74  input: ['ir3.xml'],
75  output: 'encode.h',
76  command: [
77    prog_isaspec_encode, '--xml', '@INPUT@', '--out-h', '@OUTPUT@'
78  ],
79  depend_files: isa_depend_files,
80)
81
82encode_files = [
83  encode_h,
84  'encode.c',
85  'isa.h',
86]
87
88libir3encode = static_library(
89  'ir3encode',
90  encode_files,
91  dependencies: [idep_mesautil, idep_nir],
92  include_directories: [
93    inc_src,
94    inc_include,
95    inc_freedreno,
96  ],
97  gnu_symbol_visibility: 'hidden',
98)
99