Commit da467817 authored by Kristian H. Kristensen's avatar Kristian H. Kristensen Committed by Marge Bot

freedreno/ir3: Move ir3 assembler to backend compiler

For easier reuse.

Part-of: <!4741>
parent 869d86e6
......@@ -22,9 +22,9 @@
*/
#include "ir3/ir3_compiler.h"
#include "ir3/ir3_parser.h"
#include "ir3_asm.h"
#include "ir3_parser.h"
struct ir3_kernel *
ir3_asm_assemble(struct ir3_compiler *c, FILE *in)
......
......@@ -27,7 +27,7 @@
#include "main.h"
#include "ir3/ir3_shader.h"
#include "ir3_parser.h"
#include "ir3/ir3_parser.h"
struct ir3_kernel {
struct kernel base;
......
......@@ -18,32 +18,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
ir3_parser = custom_target(
'ir3_parser.[ch]',
input: 'ir3_parser.y',
output: ['ir3_parser.c', 'ir3_parser.h'],
command: [
prog_bison, '@INPUT@', '--name-prefix=ir3_yy', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'
]
)
ir3_lexer = custom_target(
'ir3_lexer.c',
input: 'ir3_lexer.l',
output: 'ir3_lexer.c',
command: [
prog_flex, '-o', '@OUTPUT@', '@INPUT@'
]
)
computerator_files = [
'a6xx.c',
'ir3_asm.c',
'main.c',
freedreno_xml_header_files,
ir3_parser[0],
ir3_parser[1],
ir3_lexer
]
computerator = executable(
......
......@@ -42,6 +42,24 @@ ir3_nir_imul_c = custom_target(
depend_files : nir_algebraic_py,
)
ir3_parser = custom_target(
'ir3_parser.[ch]',
input: 'ir3_parser.y',
output: ['ir3_parser.c', 'ir3_parser.h'],
command: [
prog_bison, '@INPUT@', '--name-prefix=ir3_yy', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'
]
)
ir3_lexer = custom_target(
'ir3_lexer.c',
input: 'ir3_lexer.l',
output: 'ir3_lexer.c',
command: [
prog_flex, '-o', '@OUTPUT@', '@INPUT@'
]
)
libfreedreno_ir3_files = files(
'disasm-a3xx.c',
'instr-a3xx.h',
......@@ -85,7 +103,7 @@ libfreedreno_ir3_files = files(
libfreedreno_ir3 = static_library(
'freedreno_ir3',
[libfreedreno_ir3_files, ir3_nir_trig_c, ir3_nir_imul_c],
[libfreedreno_ir3_files, ir3_nir_trig_c, ir3_nir_imul_c, ir3_parser[0], ir3_parser[1], ir3_lexer],
include_directories : [inc_freedreno, inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
c_args : [c_vis_args, no_override_init_args],
cpp_args : [cpp_vis_args],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment