1*d83cc019SAndroid Build Coastguard Workerlib_brw_src = [ 2*d83cc019SAndroid Build Coastguard Worker 'brw_context.c', 3*d83cc019SAndroid Build Coastguard Worker 'brw_disasm.c', 4*d83cc019SAndroid Build Coastguard Worker 'brw_eu.c', 5*d83cc019SAndroid Build Coastguard Worker 'brw_eu_compact.c', 6*d83cc019SAndroid Build Coastguard Worker 'brw_eu_debug.c', 7*d83cc019SAndroid Build Coastguard Worker 'brw_eu_emit.c', 8*d83cc019SAndroid Build Coastguard Worker 'brw_eu_util.c', 9*d83cc019SAndroid Build Coastguard Worker 'gen8_disasm.c', 10*d83cc019SAndroid Build Coastguard Worker 'gen8_instruction.c', 11*d83cc019SAndroid Build Coastguard Worker 'ralloc.c', 12*d83cc019SAndroid Build Coastguard Worker] 13*d83cc019SAndroid Build Coastguard Worker 14*d83cc019SAndroid Build Coastguard Workerassembler_warnflags = [ 15*d83cc019SAndroid Build Coastguard Worker '-Wno-declaration-after-statement', 16*d83cc019SAndroid Build Coastguard Worker '-Wno-discarded-qualifiers', 17*d83cc019SAndroid Build Coastguard Worker '-Wno-missing-format-attribute', 18*d83cc019SAndroid Build Coastguard Worker '-Wno-old-style-definition', 19*d83cc019SAndroid Build Coastguard Worker '-Wno-redundant-decls', 20*d83cc019SAndroid Build Coastguard Worker '-Wno-shadow', 21*d83cc019SAndroid Build Coastguard Worker] 22*d83cc019SAndroid Build Coastguard Workerassembler_args = [] 23*d83cc019SAndroid Build Coastguard Workerforeach flag : assembler_warnflags 24*d83cc019SAndroid Build Coastguard Worker if cc.has_argument(flag) 25*d83cc019SAndroid Build Coastguard Worker assembler_args += flag 26*d83cc019SAndroid Build Coastguard Worker endif 27*d83cc019SAndroid Build Coastguard Workerendforeach 28*d83cc019SAndroid Build Coastguard Worker 29*d83cc019SAndroid Build Coastguard Workerlib_brw = static_library('brw', lib_brw_src, 30*d83cc019SAndroid Build Coastguard Worker c_args : assembler_args, 31*d83cc019SAndroid Build Coastguard Worker dependencies : igt_deps) 32*d83cc019SAndroid Build Coastguard Worker 33*d83cc019SAndroid Build Coastguard Workerflex = find_program('flex') 34*d83cc019SAndroid Build Coastguard Workerbison = find_program('bison') 35*d83cc019SAndroid Build Coastguard Worker 36*d83cc019SAndroid Build Coastguard Workerlgen = generator(flex, 37*d83cc019SAndroid Build Coastguard Worker output : '@[email protected]', 38*d83cc019SAndroid Build Coastguard Worker arguments : ['-i', '-o', '@OUTPUT@', '@INPUT@']) 39*d83cc019SAndroid Build Coastguard Worker 40*d83cc019SAndroid Build Coastguard Workerlfiles = lgen.process('lex.l') 41*d83cc019SAndroid Build Coastguard Worker 42*d83cc019SAndroid Build Coastguard Workerpgen = generator(bison, 43*d83cc019SAndroid Build Coastguard Worker output : ['@[email protected]', '@[email protected]'], 44*d83cc019SAndroid Build Coastguard Worker arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']) 45*d83cc019SAndroid Build Coastguard Worker 46*d83cc019SAndroid Build Coastguard Workerpfiles = pgen.process('gram.y') 47*d83cc019SAndroid Build Coastguard Worker 48*d83cc019SAndroid Build Coastguard Workerexecutable('intel-gen4asm', 'main.c', lfiles, pfiles, 49*d83cc019SAndroid Build Coastguard Worker c_args : assembler_args, 50*d83cc019SAndroid Build Coastguard Worker link_with : lib_brw, install : true) 51*d83cc019SAndroid Build Coastguard Worker 52*d83cc019SAndroid Build Coastguard Workerexecutable('intel-gen4disasm', 'disasm-main.c', 53*d83cc019SAndroid Build Coastguard Worker c_args : assembler_args, 54*d83cc019SAndroid Build Coastguard Worker link_with : lib_brw, install : true) 55*d83cc019SAndroid Build Coastguard Worker 56*d83cc019SAndroid Build Coastguard Workerconf_data = configuration_data() 57*d83cc019SAndroid Build Coastguard Workerconf_data.set('prefix', prefix) 58*d83cc019SAndroid Build Coastguard Workerconf_data.set('exec_prefix', '${prefix}') 59*d83cc019SAndroid Build Coastguard Workerconf_data.set('libdir', join_paths('${prefix}', libdir)) 60*d83cc019SAndroid Build Coastguard Workerconf_data.set('includedir', join_paths('${prefix}', includedir)) 61*d83cc019SAndroid Build Coastguard Workerconf_data.set('VERSION', meson.project_version()) 62*d83cc019SAndroid Build Coastguard Workerconfigure_file(input : 'intel-gen4asm.pc.in', output : 'intel-gen4asm.pc', 63*d83cc019SAndroid Build Coastguard Worker configuration : conf_data, install_dir : pkgconfigdir) 64*d83cc019SAndroid Build Coastguard Worker 65*d83cc019SAndroid Build Coastguard Workergen4asm_testcases = [ 66*d83cc019SAndroid Build Coastguard Worker 'test/mov', 67*d83cc019SAndroid Build Coastguard Worker 'test/frc', 68*d83cc019SAndroid Build Coastguard Worker 'test/regtype', 69*d83cc019SAndroid Build Coastguard Worker 'test/rndd', 70*d83cc019SAndroid Build Coastguard Worker 'test/rndu', 71*d83cc019SAndroid Build Coastguard Worker 'test/rnde', 72*d83cc019SAndroid Build Coastguard Worker 'test/rnde-intsrc', 73*d83cc019SAndroid Build Coastguard Worker 'test/rndz', 74*d83cc019SAndroid Build Coastguard Worker 'test/lzd', 75*d83cc019SAndroid Build Coastguard Worker 'test/not', 76*d83cc019SAndroid Build Coastguard Worker 'test/immediate', 77*d83cc019SAndroid Build Coastguard Worker] 78*d83cc019SAndroid Build Coastguard Worker 79*d83cc019SAndroid Build Coastguard Worker# Those tests were already failing when the assembler was imported from 80*d83cc019SAndroid Build Coastguard Worker# the intel-gen4asm git repository: 81*d83cc019SAndroid Build Coastguard Worker# http://cgit.freedesktop.org/xorg/app/intel-gen4asm/ 82*d83cc019SAndroid Build Coastguard Worker# We disable them "for now" as a workaround to be able to release i-g-t 83*d83cc019SAndroid Build Coastguard Workergen4asm_testcases_broken = [ 84*d83cc019SAndroid Build Coastguard Worker 'test/declare', 85*d83cc019SAndroid Build Coastguard Worker 'test/jmpi', 86*d83cc019SAndroid Build Coastguard Worker 'test/if', 87*d83cc019SAndroid Build Coastguard Worker 'test/iff', 88*d83cc019SAndroid Build Coastguard Worker 'test/while', 89*d83cc019SAndroid Build Coastguard Worker 'test/else', 90*d83cc019SAndroid Build Coastguard Worker 'test/break', 91*d83cc019SAndroid Build Coastguard Worker 'test/cont', 92*d83cc019SAndroid Build Coastguard Worker 'test/halt', 93*d83cc019SAndroid Build Coastguard Worker 'test/wait', 94*d83cc019SAndroid Build Coastguard Worker 'test/endif', 95*d83cc019SAndroid Build Coastguard Worker] 96*d83cc019SAndroid Build Coastguard Worker 97*d83cc019SAndroid Build Coastguard Workertest_runner = find_program('test/run-test.sh') 98*d83cc019SAndroid Build Coastguard Workerforeach testcase : gen4asm_testcases 99*d83cc019SAndroid Build Coastguard Worker test('assembler: ' + testcase, test_runner, 100*d83cc019SAndroid Build Coastguard Worker args : testcase, 101*d83cc019SAndroid Build Coastguard Worker env : [ 'srcdir=' + meson.current_source_dir(), 102*d83cc019SAndroid Build Coastguard Worker 'top_builddir=' + meson.current_build_dir()]) 103*d83cc019SAndroid Build Coastguard Workerendforeach 104