mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-27 11:53:21 +08:00
* gasp.c (process_assigns): Use toupper before comparing against
upper case letter. (whatcond): Likewise. PR 7281.
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
Wed Jul 19 11:49:25 1995 Ian Lance Taylor <ian@cygnus.com>
|
Wed Jul 19 11:49:25 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* gasp.c (process_assigns): Use toupper before comparing against
|
||||||
|
upper case letter.
|
||||||
|
(whatcond): Likewise.
|
||||||
|
|
||||||
* config/tc-sh.c (sh_relax): Rename from relax, and make global.
|
* config/tc-sh.c (sh_relax): Rename from relax, and make global.
|
||||||
Renamed all uses.
|
Renamed all uses.
|
||||||
(insert): Pass a size of 2, not 4.
|
(insert): Pass a size of 2, not 4.
|
||||||
|
53
gas/gasp.c
53
gas/gasp.c
@ -1957,26 +1957,26 @@ process_assigns (idx, in, buf)
|
|||||||
}
|
}
|
||||||
else if (idx + 3 < in->len
|
else if (idx + 3 < in->len
|
||||||
&& in->ptr[idx] == '.'
|
&& in->ptr[idx] == '.'
|
||||||
&& in->ptr[idx + 1] == 'L'
|
&& toupper ((unsigned char) in->ptr[idx + 1]) == 'L'
|
||||||
&& in->ptr[idx + 2] == 'E'
|
&& toupper ((unsigned char) in->ptr[idx + 2]) == 'E'
|
||||||
&& in->ptr[idx + 3] == 'N')
|
&& toupper ((unsigned char) in->ptr[idx + 3]) == 'N')
|
||||||
idx = dolen (idx + 4, in, buf);
|
idx = dolen (idx + 4, in, buf);
|
||||||
else if (idx + 6 < in->len
|
else if (idx + 6 < in->len
|
||||||
&& in->ptr[idx] == '.'
|
&& in->ptr[idx] == '.'
|
||||||
&& in->ptr[idx + 1] == 'I'
|
&& toupper ((unsigned char) in->ptr[idx + 1]) == 'I'
|
||||||
&& in->ptr[idx + 2] == 'N'
|
&& toupper ((unsigned char) in->ptr[idx + 2]) == 'N'
|
||||||
&& in->ptr[idx + 3] == 'S'
|
&& toupper ((unsigned char) in->ptr[idx + 3]) == 'S'
|
||||||
&& in->ptr[idx + 4] == 'T'
|
&& toupper ((unsigned char) in->ptr[idx + 4]) == 'T'
|
||||||
&& in->ptr[idx + 5] == 'R')
|
&& toupper ((unsigned char) in->ptr[idx + 5]) == 'R')
|
||||||
idx = doinstr (idx + 6, in, buf);
|
idx = doinstr (idx + 6, in, buf);
|
||||||
else if (idx + 7 < in->len
|
else if (idx + 7 < in->len
|
||||||
&& in->ptr[idx] == '.'
|
&& in->ptr[idx] == '.'
|
||||||
&& in->ptr[idx + 1] == 'S'
|
&& toupper ((unsigned char) in->ptr[idx + 1]) == 'S'
|
||||||
&& in->ptr[idx + 2] == 'U'
|
&& toupper ((unsigned char) in->ptr[idx + 2]) == 'U'
|
||||||
&& in->ptr[idx + 3] == 'B'
|
&& toupper ((unsigned char) in->ptr[idx + 3]) == 'B'
|
||||||
&& in->ptr[idx + 4] == 'S'
|
&& toupper ((unsigned char) in->ptr[idx + 4]) == 'S'
|
||||||
&& in->ptr[idx + 5] == 'T'
|
&& toupper ((unsigned char) in->ptr[idx + 5]) == 'T'
|
||||||
&& in->ptr[idx + 6] == 'R')
|
&& toupper ((unsigned char) in->ptr[idx + 6]) == 'R')
|
||||||
idx = dosubstr (idx + 7, in, buf);
|
idx = dosubstr (idx + 7, in, buf);
|
||||||
else if (ISFIRSTCHAR (in->ptr[idx]))
|
else if (ISFIRSTCHAR (in->ptr[idx]))
|
||||||
{
|
{
|
||||||
@ -2275,22 +2275,31 @@ whatcond (idx, in, val)
|
|||||||
int *val;
|
int *val;
|
||||||
{
|
{
|
||||||
int cond;
|
int cond;
|
||||||
char *p;
|
|
||||||
idx = sb_skip_white (idx, in);
|
idx = sb_skip_white (idx, in);
|
||||||
|
cond = NEVER;
|
||||||
|
if (idx + 1 < in->len)
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
char a, b;
|
||||||
|
|
||||||
p = in->ptr + idx;
|
p = in->ptr + idx;
|
||||||
if (p[0] == 'E' && p[1] == 'Q')
|
a = toupper ((unsigned char) p[0]);
|
||||||
|
b = toupper ((unsigned char) p[1]);
|
||||||
|
if (a == 'E' && b == 'Q')
|
||||||
cond = EQ;
|
cond = EQ;
|
||||||
else if (p[0] == 'N' && p[1] == 'E')
|
else if (a == 'N' && b == 'E')
|
||||||
cond = NE;
|
cond = NE;
|
||||||
else if (p[0] == 'L' && p[1] == 'T')
|
else if (a == 'L' && b == 'T')
|
||||||
cond = LT;
|
cond = LT;
|
||||||
else if (p[0] == 'L' && p[1] == 'E')
|
else if (a == 'L' && b == 'E')
|
||||||
cond = LE;
|
cond = LE;
|
||||||
else if (p[0] == 'G' && p[1] == 'T')
|
else if (a == 'G' && b == 'T')
|
||||||
cond = GT;
|
cond = GT;
|
||||||
else if (p[0] == 'G' && p[1] == 'E')
|
else if (a == 'G' && b == 'E')
|
||||||
cond = GE;
|
cond = GE;
|
||||||
else
|
}
|
||||||
|
if (cond == NEVER)
|
||||||
{
|
{
|
||||||
ERROR ((stderr, "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n"));
|
ERROR ((stderr, "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n"));
|
||||||
cond = NEVER;
|
cond = NEVER;
|
||||||
|
Reference in New Issue
Block a user