From: Rob Clark Date: Sun, 1 Mar 2020 22:20:56 +0000 (-0800) Subject: freedreno/computerator: add hrsq/hlog2/hexp2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad2ff7a278a80a05021c68fa014731e8d9c10713;p=mesa.git freedreno/computerator: add hrsq/hlog2/hexp2 Signed-off-by: Rob Clark Part-of: --- diff --git a/src/freedreno/computerator/ir3_lexer.l b/src/freedreno/computerator/ir3_lexer.l index ce2fb70b3d9..5823dd0e43c 100644 --- a/src/freedreno/computerator/ir3_lexer.l +++ b/src/freedreno/computerator/ir3_lexer.l @@ -195,6 +195,9 @@ static int parse_reg(const char *str) "sin" return TOKEN(T_OP_SIN); "cos" return TOKEN(T_OP_COS); "sqrt" return TOKEN(T_OP_SQRT); +"hrsq" return TOKEN(T_OP_HRSQ); +"hlog2" return TOKEN(T_OP_HLOG2); +"hexp2" return TOKEN(T_OP_HEXP2); /* category 5: */ "isam" return TOKEN(T_OP_ISAM); diff --git a/src/freedreno/computerator/ir3_parser.y b/src/freedreno/computerator/ir3_parser.y index f98233e9609..349b5578eda 100644 --- a/src/freedreno/computerator/ir3_parser.y +++ b/src/freedreno/computerator/ir3_parser.y @@ -360,6 +360,9 @@ static void print_token(FILE *file, int type, YYSTYPE value) %token T_OP_SIN %token T_OP_COS %token T_OP_SQRT +%token T_OP_HRSQ +%token T_OP_HLOG2 +%token T_OP_HEXP2 /* category 5: */ %token T_OP_ISAM @@ -670,6 +673,9 @@ cat4_opc: T_OP_RCP { new_instr(OPC_RCP); } | T_OP_SIN { new_instr(OPC_SIN); } | T_OP_COS { new_instr(OPC_COS); } | T_OP_SQRT { new_instr(OPC_SQRT); } +| T_OP_HRSQ { new_instr(OPC_HRSQ); } +| T_OP_HLOG2 { new_instr(OPC_HLOG2); } +| T_OP_HEXP2 { new_instr(OPC_HEXP2); } cat4_instr: cat4_opc dst_reg ',' src_reg_or_const_or_rel_or_imm