1# Copyright (C) 2020-2021 Collabora 2# Copyright (C) 2018 Rob Clark 3 4# Permission is hereby granted, free of charge, to any person obtaining a copy 5# of this software and associated documentation files (the "Software"), to deal 6# in the Software without restriction, including without limitation the rights 7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8# copies of the Software, and to permit persons to whom the Software is 9# furnished to do so, subject to the following conditions: 10 11# The above copyright notice and this permission notice shall be included in 12# all copies or substantial portions of the Software. 13 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20# SOFTWARE. 21 22valhall_disasm_c = custom_target( 23 'valhall_disasm_c', 24 input : ['disasm.py', 'ISA.xml'], 25 output : 'valhall_disasm.c', 26 command : [prog_python, '@INPUT@'], 27 capture : true, 28 depend_files : files('valhall.py'), 29) 30 31libpanfrost_valhall_disasm = static_library( 32 'panfrost_valhall_disasm', 33 valhall_disasm_c, 34 include_directories : [inc_include, inc_src, inc_mesa], 35 c_args : [no_override_init_args], 36 gnu_symbol_visibility : 'hidden', 37 build_by_default : false, 38) 39 40if with_tests 41 test( 42 'valhall_disasm', 43 executable( 44 'valhall_disasm_test', 45 files('test/test-disassembler.c'), 46 c_args : [c_msvc_compat_args, no_override_init_args], 47 gnu_symbol_visibility : 'hidden', 48 include_directories : [inc_include, inc_src, inc_mesa], 49 link_with : [libpanfrost_valhall_disasm], 50 ), 51 suite : ['panfrost'], 52 args : files('test/assembler-cases.txt'), 53 ) 54 55 test( 56 'valhall_asm', 57 prog_python, 58 args : files('test-assembly.py', 'test/assembler-cases.txt', 'test/negative-cases.txt'), 59 suite : ['panfrost'], 60 ) 61endif 62