mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 18:38:11 +02:00
intel: Rename i965_{asm,disasm} tools to brw_{asm,disasm}
And move them inside the compiler since they (especially asm) rely on a bunch of internal types. Acked-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
This commit is contained in:
parent
5992185c8d
commit
0b751a2134
624 changed files with 98 additions and 93 deletions
|
|
@ -22,8 +22,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef __I965_ASM_H__
|
||||
#define __I965_ASM_H__
|
||||
#ifndef BRW_ASM_H
|
||||
#define BRW_ASM_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
|
@ -119,4 +119,4 @@ struct target_label {
|
|||
int offset;
|
||||
};
|
||||
|
||||
#endif /* __I965_ASM_H__ */
|
||||
#endif /* BRW_ASM_H */
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include "i965_asm.h"
|
||||
#include "brw_asm.h"
|
||||
#include "intel/compiler/brw_disasm_info.h"
|
||||
|
||||
enum opt_output_type {
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include "i965_asm.h"
|
||||
#include "brw_asm.h"
|
||||
|
||||
#undef yyerror
|
||||
#ifdef YYBYACC
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
%option nounput
|
||||
%{
|
||||
#include <string.h>
|
||||
#include "i965_asm.h"
|
||||
#include "brw_asm.h"
|
||||
#undef ALIGN16
|
||||
#include "i965_gram.tab.h"
|
||||
#include "brw_gram.tab.h"
|
||||
|
||||
/* Locations */
|
||||
int yycolumn = 1;
|
||||
|
|
@ -224,3 +224,88 @@ if with_tests
|
|||
protocol : 'gtest',
|
||||
)
|
||||
endif
|
||||
|
||||
if with_intel_tools
|
||||
|
||||
bison_command = []
|
||||
if yacc_is_bison
|
||||
bison_command = [
|
||||
prog_bison, '@INPUT@', '--defines=@OUTPUT1@',
|
||||
'--output=@OUTPUT0@'
|
||||
]
|
||||
else
|
||||
bison_command = [
|
||||
prog_bison, '-H', '@OUTPUT1@',
|
||||
'-o', '@OUTPUT0@', '@INPUT@'
|
||||
]
|
||||
endif
|
||||
|
||||
brw_gram_tab = custom_target(
|
||||
'brw_gram.tab.[ch]',
|
||||
input : 'brw_gram.y',
|
||||
output : ['brw_gram.tab.c', 'brw_gram.tab.h'],
|
||||
command : bison_command
|
||||
)
|
||||
|
||||
brw_lex_yy_c = custom_target(
|
||||
'brw_lex.yy.c',
|
||||
input : 'brw_lex.l',
|
||||
output : 'brw_lex.yy.c',
|
||||
command : [prog_flex, '-o', '@OUTPUT@', '@INPUT@']
|
||||
)
|
||||
|
||||
brw_asm_tool = executable(
|
||||
'brw_asm',
|
||||
['brw_asm_tool.c', brw_gram_tab[0], brw_gram_tab[1], brw_lex_yy_c],
|
||||
dependencies : [idep_mesautil, dep_thread, idep_intel_dev],
|
||||
include_directories : [inc_include, inc_src, inc_intel],
|
||||
link_with : [libintel_common, libintel_compiler],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
install : true
|
||||
)
|
||||
|
||||
asm_testcases = [
|
||||
['brw', 'gfx4'],
|
||||
['g4x', 'gfx4.5'],
|
||||
['ilk', 'gfx5'],
|
||||
['snb', 'gfx6'],
|
||||
['ivb', 'gfx7'],
|
||||
['hsw', 'gfx7.5'],
|
||||
['bdw', 'gfx8'],
|
||||
['skl', 'gfx9'],
|
||||
['icl', 'gfx11'],
|
||||
['tgl', 'gfx12'],
|
||||
['dg2', 'gfx12.5'],
|
||||
]
|
||||
|
||||
test_runner = find_program('tests/run-test.py')
|
||||
foreach testcase : asm_testcases
|
||||
_gen_name = testcase[0]
|
||||
_gen_num = testcase[1]
|
||||
_gen_folder = join_paths(meson.current_source_dir(), 'tests',
|
||||
_gen_num.replace('gfx', 'gen'))
|
||||
test(
|
||||
'brw_asm_' + _gen_num, test_runner,
|
||||
args : [
|
||||
'--brw_asm', brw_asm_tool,
|
||||
'--gen_name', _gen_name,
|
||||
'--gen_folder', _gen_folder,
|
||||
],
|
||||
suite : 'intel',
|
||||
)
|
||||
endforeach
|
||||
|
||||
brw_disasm_tool = executable(
|
||||
'brw_disasm',
|
||||
files('brw_disasm_tool.c'),
|
||||
dependencies : [idep_mesautil, dep_thread, idep_intel_dev],
|
||||
include_directories : [inc_include, inc_src, inc_intel],
|
||||
link_with : [libintel_common, libintel_compiler],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
install : true
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue