freedreno/computerator: add hrsq/hlog2/hexp2
authorRob Clark <robdclark@chromium.org>
Sun, 1 Mar 2020 22:20:56 +0000 (14:20 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Mar 2020 16:01:39 +0000 (16:01 +0000)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4071>

src/freedreno/computerator/ir3_lexer.l
src/freedreno/computerator/ir3_parser.y

index ce2fb70b3d99363e37408a3992ce222c246e6095..5823dd0e43cc12dfb1fac074bdde89fbb120f7d5 100644 (file)
@@ -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);
index f98233e9609840d61a5345de11fe438b5ddac6ce..349b5578eda54f17aad147157434c80331c0e9c5 100644 (file)
@@ -360,6 +360,9 @@ static void print_token(FILE *file, int type, YYSTYPE value)
 %token <tok> T_OP_SIN
 %token <tok> T_OP_COS
 %token <tok> T_OP_SQRT
+%token <tok> T_OP_HRSQ
+%token <tok> T_OP_HLOG2
+%token <tok> T_OP_HEXP2
 
 /* category 5: */
 %token <tok> 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