#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "toplev.h"
#include "hashtab.h"
#include "pointer-set.h"
#include "tree.h"
case TARGET_MEM_REF:
/* Hand back the decl for MEM[&decl, off]. */
- if (TMR_SYMBOL (exp))
+ if (TREE_CODE (TMR_BASE (exp)) == ADDR_EXPR)
{
- /* Via the variable index we can reach the whole object. */
- if (TMR_INDEX (exp))
+ /* Via the variable index or index2 we can reach the
+ whole object. */
+ if (TMR_INDEX (exp) || TMR_INDEX2 (exp))
{
- exp = TMR_SYMBOL (exp);
+ exp = TREE_OPERAND (TMR_BASE (exp), 0);
bit_offset = 0;
maxsize = -1;
goto done;
}
if (integer_zerop (TMR_OFFSET (exp)))
- exp = TMR_SYMBOL (exp);
+ exp = TREE_OPERAND (TMR_BASE (exp), 0);
else
{
double_int off = mem_ref_offset (exp);
if (double_int_fits_in_shwi_p (off))
{
bit_offset = double_int_to_shwi (off);
- exp = TMR_SYMBOL (exp);
+ exp = TREE_OPERAND (TMR_BASE (exp), 0);
}
}
}
case TARGET_MEM_REF:
/* Hand back the decl for MEM[&decl, off]. */
- if (TMR_SYMBOL (exp))
+ if (TREE_CODE (TMR_BASE (exp)) == ADDR_EXPR)
{
- if (TMR_SYMBOL (exp))
+ if (TMR_INDEX (exp) || TMR_INDEX2 (exp))
return NULL_TREE;
if (!integer_zerop (TMR_OFFSET (exp)))
{
gcc_assert (off.high == -1 || off.high == 0);
byte_offset += double_int_to_shwi (off);
}
- exp = TMR_SYMBOL (exp);
+ exp = TREE_OPERAND (TMR_BASE (exp), 0);
}
goto done;