ir3/parser: add uinteger helper

To match unsigned immediates.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
This commit is contained in:
Job Noorman 2025-06-26 11:35:54 +02:00 committed by Marge Bot
parent f9b03fd170
commit d328b1e8c0

View file

@ -784,7 +784,7 @@ static void print_token(FILE *file, int type, YYSTYPE value)
%token <tok> T_MOD_RUP
%token <tok> T_MOD_RDOWN
%type <num> integer offset uoffset
%type <num> integer uinteger offset uoffset
%type <num> flut_immed
%type <flt> float
%type <reg> dst const src_gpr src_a0 src_a1 src_p0 cat0_src1 cat0_src2
@ -1709,10 +1709,11 @@ flut_immed: T_FLUT_0_0
| T_FLUT_LOG2_10
| T_FLUT_4_0
integer: T_INT { $$ = $1; }
| '-' T_INT { $$ = -$2; }
uinteger: T_INT { $$ = $1; }
| T_HEX { $$ = $1; }
| '-' T_HEX { $$ = -$2; }
integer: uinteger { $$ = $1; }
| '-' uinteger { $$ = -$2; }
float: T_FLOAT { $$ = $1; }
| '-' T_FLOAT { $$ = -$2; }