aboutsummaryrefslogtreecommitdiff
path: root/gas/config/bfin-lex.l
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2009-09-03 17:06:38 +0000
committerJie Zhang <jie.zhang@analog.com>2009-09-03 17:06:38 +0000
commitf31bf2c696b9bd0a0d4aff20f7c0f65d87179212 (patch)
tree8c28e418a1bda5de2e3f375ead6219cd85807840 /gas/config/bfin-lex.l
parent118176876bb5ceef6f8d15413602107c157dd106 (diff)
downloadgdb-f31bf2c696b9bd0a0d4aff20f7c0f65d87179212.zip
gdb-f31bf2c696b9bd0a0d4aff20f7c0f65d87179212.tar.gz
gdb-f31bf2c696b9bd0a0d4aff20f7c0f65d87179212.tar.bz2
* config/bfin-defs.h (F_REG_ALL): Remove macro.
(F_REG_HIGH): Redefine. (F_REG_NONE): New macro. (F_REG_LOW): New macro. (REG_CLASS): Enclose macro argument in parentheses when used. (REG_EVEN): Likewise. (IS_H): Use flags. (IS_HCOMPL): Use flags. * config/bfin-lex.l (SP.L, SP.H, FP.L, FP.H): Set flags. (parse_reg): Set flags. (parse_halfreg): Set flags.
Diffstat (limited to 'gas/config/bfin-lex.l')
-rw-r--r--gas/config/bfin-lex.l12
1 files changed, 7 insertions, 5 deletions
diff --git a/gas/config/bfin-lex.l b/gas/config/bfin-lex.l
index 26c8f17..d72ad06 100644
--- a/gas/config/bfin-lex.l
+++ b/gas/config/bfin-lex.l
@@ -63,8 +63,8 @@ int yylex (void);
[sS][yY][sS][cC][fF][gG] _REG.regno = REG_SYSCFG; return REG;
[sS][tT][iI] return STI;
[sS][sS][yY][nN][cC] return SSYNC;
-[sS][pP]"."[lL] _REG.regno = REG_SP; return HALF_REG;
-[sS][pP]"."[hH] _REG.regno = REG_SP | F_REG_HIGH; return HALF_REG;
+[sS][pP]"."[lL] _REG.regno = REG_SP; _REG.flags = F_REG_LOW; return HALF_REG;
+[sS][pP]"."[hH] _REG.regno = REG_SP; _REG.flags = F_REG_HIGH; return HALF_REG;
[sS][pP] _REG.regno = REG_SP; return REG;
[sS][iI][gG][nN][bB][iI][tT][sS] return SIGNBITS;
[sS][iI][gG][nN] return SIGN;
@@ -158,8 +158,8 @@ int yylex (void);
[gG][eE] return GE;
[fF][uU] yylval.value = M_FU; return MMOD;
[fF][pP] _REG.regno = REG_FP; return REG;
-[fF][pP]"."[lL] _REG.regno = REG_FP; return HALF_REG;
-[fF][pP]"."[hH] _REG.regno = REG_FP | F_REG_HIGH; return HALF_REG;
+[fF][pP]"."[lL] _REG.regno = REG_FP; _REG.flags = F_REG_LOW; return HALF_REG;
+[fF][pP]"."[hH] _REG.regno = REG_FP; _REG.flags = F_REG_HIGH; return HALF_REG;
[eE][xX][tT][rR][aA][cC][tT] return EXTRACT;
[eE][xX][pP][aA][dD][jJ] return EXPADJ;
@@ -509,6 +509,7 @@ static long parse_int (char **end)
static int parse_reg (Register *r, int cl, char *rt)
{
r->regno = cl | (rt[1] - '0');
+ r->flags = F_REG_NONE;
return REG;
}
@@ -524,11 +525,12 @@ static int parse_halfreg (Register *r, int cl, char *rt)
case 'l':
case 'L':
+ r->flags = F_REG_LOW;
break;
case 'h':
case 'H':
- r->regno |= F_REG_HIGH;
+ r->flags = F_REG_HIGH;
break;
}