{
operand *result = IC_RESULT(ic);
sym_link *ctype = operandType(IC_LEFT(ic));
+ sym_link *rtype = operandType(IC_RIGHT(ic));
operand *right = IC_RIGHT(ic);
int size, offset ;
/* now depending on the sign of the destination */
size = AOP_SIZE(result) - AOP_SIZE(right);
/* if unsigned or not an integral type */
- if (SPEC_USIGN(ctype) || !IS_SPEC(ctype)) {
+ if (SPEC_USIGN(rtype) || !IS_SPEC(rtype)) {
while (size--)
emitpcode(POC_CLRF, popGet(AOP(result),offset++));
} else {
genCast (iCode * ic)
{
operand *result = IC_RESULT (ic);
- sym_link *ctype = operandType (IC_LEFT (ic));
+ sym_link *rtype = operandType (IC_RIGHT (ic));
operand *right = IC_RIGHT (ic);
int size, offset;
/* now depending on the sign of the destination */
size = AOP_SIZE (result) - AOP_SIZE (right);
/* Unsigned or not an integral type - right fill with zeros */
- if (SPEC_USIGN (ctype) || !IS_SPEC (ctype))
+ if (SPEC_USIGN (rtype) || !IS_SPEC (rtype) || AOP_TYPE(right)==AOP_CRY)
{
while (size--)
aopPut (AOP (result), "!zero", offset++);