mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-27 06:04:12 +08:00
* i386.c (legitimate_address_p): Verify modes of base and index.
From-SVN: r25209
This commit is contained in:
parent
59be65f6b5
commit
c954bd0157
@ -1,3 +1,7 @@
|
||||
Sun Feb 14 23:12:10 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* i386.c (legitimate_address_p): Verify modes of base and index.
|
||||
|
||||
Sun Feb 14 23:01:28 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* i386.c (legitimate_pic_address_disp_p): Remove static.
|
||||
|
@ -2601,7 +2601,7 @@ legitimate_address_p (mode, addr, strict)
|
||||
}
|
||||
|
||||
if (GET_CODE (addr) == REG || GET_CODE (addr) == SUBREG)
|
||||
base = addr;
|
||||
base = addr;
|
||||
|
||||
else if (GET_CODE (addr) == PLUS)
|
||||
{
|
||||
@ -2691,6 +2691,12 @@ legitimate_address_p (mode, addr, strict)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (GET_MODE (base) != Pmode)
|
||||
{
|
||||
ADDR_INVALID ("Base is not in Pmode.\n", base);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((strict && ! REG_OK_FOR_BASE_STRICT_P (base))
|
||||
|| (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (base)))
|
||||
{
|
||||
@ -2712,6 +2718,12 @@ legitimate_address_p (mode, addr, strict)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (GET_MODE (indx) != Pmode)
|
||||
{
|
||||
ADDR_INVALID ("Index is not in Pmode.\n", indx);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (indx))
|
||||
|| (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (indx)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user