/* other wise this is true end of the world */
werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
"getFreePtr should never reach here");
- exit(0);
+ exit(1);
}
/*-----------------------------------------------------------------*/
werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
"aopget got unsupported aop->type");
- exit(0);
+ exit(1);
}
/*-----------------------------------------------------------------*/
/* aopPut - puts a string for a aop */
if (aop->size && offset > ( aop->size - 1)) {
werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
"aopPut got offset > aop->size");
- exit(0);
+ exit(1);
}
/* will assign value to value */
if (aop->code) {
werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
"aopPut writting to code space");
- exit(0);
+ exit(1);
}
while (offset > aop->coff) {
default :
werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
"aopPut got unsupported aop->type");
- exit(0);
+ exit(1);
}
}
size = getDataSize(IC_LEFT(ic));
+ /* If the pushed data is bigger than the result,
+ * simply discard unused bytes. Icky, but works.
+ *
+ * Should we throw a warning here? We're losing data...
+ */
+ while (size > getDataSize(IC_RESULT(ic)))
+ {
+ emitcode(";", "discarding unused result byte.");
+ emitcode("pop", "acc");
+ size--;
+ offset--;
+ }
+
while(size--)
{
emitcode("pop", "acc");
{
werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
"both CMP operands need ACC!");
- exit(-1);
+ exit(1);
}
else
{