case SYMBOL:
#define REGA 1
#ifdef REGA
- fprintf (file, "%s [k%d lr%d:%d so:%d]{ ia%d re%d rm%d nos%d ru%d dp%d}", /*{ar%d rm%d ru%d p%d a%d u%d i%d au%d k%d ks%d}" , */
+ fprintf (file, "%s [k%d lr%d:%d so:%d]{ ia%d a2p%d re%d rm%d nos%d ru%d dp%d}", /*{ar%d rm%d ru%d p%d a%d u%d i%d au%d k%d ks%d}" , */
(OP_SYMBOL (op)->rname[0] ? OP_SYMBOL (op)->rname : OP_SYMBOL (op)->name),
op->key,
OP_LIVEFROM (op), OP_LIVETO (op),
OP_SYMBOL (op)->stack,
- op->isaddr, OP_SYMBOL (op)->isreqv,
+ op->isaddr, op->aggr2ptr, OP_SYMBOL (op)->isreqv,
OP_SYMBOL (op)->remat,OP_SYMBOL(op)->noSpilLoc,
OP_SYMBOL(op)->ruonly,OP_SYMBOL(op)->dptr
);
}
/*-----------------------------------------------------------------*/
-/* aggrToPtr - changes an aggregate to pointer to an aggregate */
+/* aggrToPtr - changes an "aggregate" to a "pointer to aggregate" */
/*-----------------------------------------------------------------*/
sym_link *
aggrToPtr (sym_link * type, bool force)
!IS_PTR (ltype->next))
? ltype : ltype->next), 0);
- IC_RESULT (ic)->isaddr = (!IS_AGGREGATE (ltype->next));
+ if (!IS_AGGREGATE (ltype->next))
+ {
+ IC_RESULT (ic)->isaddr = 1;
+ IC_RESULT (ic)->aggr2ptr = 1;
+ }
ADDTOCHAIN (ic);
return IC_RESULT (ic);
right->operand.symOperand);
wassert(IS_SYMOP(right));
-
+
/* add the offset */
ic = newiCode ('+', left, operandFromLit (element->offset));
SPEC_OCLS (retype) = SPEC_OCLS (etype);
SPEC_VOLATILE (retype) |= SPEC_VOLATILE (etype);
SPEC_CONST (retype) |= SPEC_CONST (etype);
-
+
if (IS_PTR (element->type))
setOperandType (IC_RESULT (ic), aggrToPtr (operandType (IC_RESULT (ic)), TRUE));
-
+
IC_RESULT (ic)->isaddr = (!IS_AGGREGATE (element->type));
ADDTOCHAIN (ic);
/* inserts jumps to the default label for the missing numbers */
/* and decides later whether it is worth it */
min = (int) floatFromVal (vch = caseVals);
-
+
while (vch->next)
{
cnt++;
vch = vch->next;
}
max = (int) floatFromVal (vch);
-
+
/* Exit if the range is too large to handle with a jump table. */
if (1 + max - min > port->jumptableCost.maxCount)
return 0;
-
+
switch (getSize (operandType (cond)))
{
case 1: sizeIndex = 0; break;
if (1 + max <= port->jumptableCost.maxCount)
min = 0;
}
-
+
/* Compute the total size cost of a jump table. */
sizeofJumpTable = (1 + max - min) * port->jumptableCost.sizeofElement
+ port->jumptableCost.sizeofDispatch
/* If the size cost of the jump table is uneconomical then exit */
if (sizeofMatchJump < sizeofJumpTable)
return 0;
-
+
/* The jump table is preferable. */
/* First, a label for the default or missing cases. */
tree->values.switchVals.swNum);
}
falseLabel = newiTempLabel (buffer);
-
+
/* Build the list of labels for the jump table. */
vch = caseVals;
t = (int) floatFromVal (vch);