need to get the stack offset of this
variable */
if (sym->onStack) {
- /* if it has an offset then we need to compute
- it */
+ /* if it has an offset then we need to compute it */
if (sym->stack) {
emitcode ("mov", "a,_bp");
emitcode ("add", "a,#0x%02x",
aopPut (AOP (IC_RESULT (ic)), "_bp", 0);
}
/* fill the result with zero */
- size = AOP_SIZE (IC_RESULT (ic)) - 1;
-
-
- if (options.stack10bit && size < (FPTRSIZE - 1)) {
- fprintf (stderr,
- "*** warning: pointer to stack var truncated.\n");
- }
-
- offset = 1;
+ size = AOP_SIZE (IC_RESULT (ic)) - 2;
+ offset = 2;
while (size--) {
- /* Yuck! */
- if (options.stack10bit && offset == 2) {
- aopPut (AOP (IC_RESULT (ic)), "0x40",
- offset++);
- }
- else {
- aopPut (AOP (IC_RESULT (ic)), zero, offset++);
- }
+ aopPut (AOP (IC_RESULT (ic)), zero, offset++);
}
goto release;
for (lic = ic; lic != dic ; lic = lic->prev) {
if (bitVectBitValue(dbv,lic->key)) return ;
}
-
+ /* extend the live range of replaced operand if needed */
+ if (OP_SYMBOL(IC_RIGHT(dic))->liveTo < ic->seq) {
+ OP_SYMBOL(IC_RIGHT(dic))->liveTo = ic->seq;
+ }
/* we now we know that it has one & only one def & use
and the that the definition is an assignment */
IC_LEFT (ic) = IC_RIGHT (dic);
if (bitVectBitValue(dbv,lic->key))
return ;
}
+ /* extend the live range of replaced operand if needed */
+ if (OP_SYMBOL(IC_RIGHT(dic))->liveTo < ic->seq) {
+ OP_SYMBOL(IC_RIGHT(dic))->liveTo = ic->seq;
+ }
/* we now we know that it has one & only one def & use
and the that the definition is an assignment */
IC_LEFT (ic) = IC_RIGHT (dic);
-
+
remiCodeFromeBBlock (ebp, dic);
hTabDeleteItem (&iCodehTab, dic->key, dic, DELETE_ITEM, NULL);
}
if (dic)
{
if (IS_ARITHMETIC_OP (dic))
- {
+ {
IC_RESULT (dic) = IC_RESULT (ic);
remiCodeFromeBBlock (ebp, ic);
hTabDeleteItem (&iCodehTab, ic->key, ic, DELETE_ITEM, NULL);