summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-21 09:51:55 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-09-28 04:06:00 -0400
commit2d327f3e6294d1bca39991d556d52f81cef642e3 (patch)
tree5806855ee1e4f610066d56046944b1033f8469f1
parent73857f8ac6cca19fe0e2580382f2949a27cfe89d (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.
-rw-r--r--src/gram.y7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gram.y b/src/gram.y
index 3a85b75..2897447 100644
--- a/src/gram.y
+++ b/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;