Parse negative integers for imm32s, and don't exceed the IP count width field.

This fixes the while test.
This commit is contained in:
Eric Anholt 2006-08-31 15:59:14 -07:00 committed by Damien Lespiau
parent d538dfc462
commit 330903ad81

View File

@ -1010,7 +1010,7 @@ relativelocation: imm32
$$.reg_file = BRW_IMMEDIATE_VALUE; $$.reg_file = BRW_IMMEDIATE_VALUE;
$$.reg_type = BRW_REGISTER_TYPE_D; $$.reg_type = BRW_REGISTER_TYPE_D;
$$.imm32 = $1; $$.imm32 = (int)$1 & 0x0000ffff;
} }
; ;
@ -1151,6 +1151,7 @@ writemask_w: /* empty */ { $$ = 0; }
/* 1.4.11: Immediate values */ /* 1.4.11: Immediate values */
imm32: INTEGER { $$ = $1; } imm32: INTEGER { $$ = $1; }
| MINUS INTEGER { $$ = -$2; }
| NUMBER { $$ = $1; } | NUMBER { $$ = $1; }
; ;