aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/freedreno/ir3/ir3_lexer.l2
-rw-r--r--src/freedreno/ir3/ir3_parser.y5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_lexer.l b/src/freedreno/ir3/ir3_lexer.l
index 823cb1587dc..f93d25b5328 100644
--- a/src/freedreno/ir3/ir3_lexer.l
+++ b/src/freedreno/ir3/ir3_lexer.l
@@ -308,6 +308,8 @@ static int parse_reg(const char *str)
"|" return '|';
"c" return 'c';
"r" return 'r';
+"hc" return TOKEN(T_HC);
+"hr" return TOKEN(T_HR);
"g" return 'g';
"l" return 'l';
"<" return '<';
diff --git a/src/freedreno/ir3/ir3_parser.y b/src/freedreno/ir3/ir3_parser.y
index 27c52bd21e9..6c06f1d3e03 100644
--- a/src/freedreno/ir3/ir3_parser.y
+++ b/src/freedreno/ir3/ir3_parser.y
@@ -266,6 +266,9 @@ static void print_token(FILE *file, int type, YYSTYPE value)
%token <tok> T_ABS
%token <tok> T_R
+%token <tok> T_HR
+%token <tok> T_HC
+
/* dst register flags */
%token <tok> T_EVEN
%token <tok> T_POS_INFINITY
@@ -873,6 +876,8 @@ offset: { $$ = 0; }
relative: 'r' '<' T_A0 offset '>' { new_reg(0, IR3_REG_RELATIV)->array.offset = $4; }
| 'c' '<' T_A0 offset '>' { new_reg(0, IR3_REG_RELATIV | IR3_REG_CONST)->array.offset = $4; }
+| T_HR '<' T_A0 offset '>' { new_reg(0, IR3_REG_RELATIV | IR3_REG_HALF)->array.offset = $4; }
+| T_HC '<' T_A0 offset '>' { new_reg(0, IR3_REG_RELATIV | IR3_REG_CONST | IR3_REG_HALF)->array.offset = $4; }
immediate: integer { new_reg(0, IR3_REG_IMMED)->iim_val = $1; }
| '(' integer ')' { new_reg(0, IR3_REG_IMMED)->fim_val = $2; }