summaryrefslogtreecommitdiff
path: root/assembler
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-21 09:51:55 +0800
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:33 +0000
commit1f9a4d71e8b87ab08209cd42b6651b4e0c04a433 (patch)
tree5fdcc294685adf357ab91766efc65ef1f352a193 /assembler
parentccd17211909ce0a1c64904e70774a770feb8b8a4 (diff)
Restrict type of relativelocation2 to int
Original rule set it to EXP | NUMBER, then YYERROR if it is NUMBER. This patch set it directly to EXP, restricting its type to int.
Diffstat (limited to 'assembler')
-rw-r--r--assembler/src/gram.y7
1 files changed, 1 insertions, 6 deletions
diff --git a/assembler/src/gram.y b/assembler/src/gram.y
index 3a85b750..2897447a 100644
--- a/assembler/src/gram.y
+++ b/assembler/src/gram.y
@@ -2136,13 +2136,8 @@ relativelocation: imm32
;
relativelocation2:
- imm32
+ exp
{
- if ($1.r != imm32_d) {
- fprintf (stderr,
- "error: non-int location representation\n");
- YYERROR;
- }
memset (&$$, '\0', sizeof ($$));
$$.reg_file = BRW_IMMEDIATE_VALUE;
$$.reg_type = BRW_REGISTER_TYPE_D;