X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fds390%2Fgen.c;h=3cdc68bad8341177be91406415ae851d3f0a58bf;hb=195ee3f3ee25ce2c5f2a59fbd2779c4cb80527c3;hp=945637411fc5bd8701d08d14862e544a79b2c1cc;hpb=0712ffe9a67e08c25e671a333432ff75ea2f7319;p=fw%2Fsdcc diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 94563741..3cdc68ba 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -166,7 +166,7 @@ emitcode (char *inst, const char *fmt,...) tvsprintf (lb, sizeof(lb), fmt, ap); } - while (isspace (*lbp)) + while (isspace ((unsigned char)*lbp)) { lbp++; } @@ -741,12 +741,8 @@ aopForRemat (symbol * sym) sym_link *from_type = operandType(IC_RIGHT(ic)); aop->aopu.aop_immd.from_cast_remat = 1; ic = OP_SYMBOL (IC_RIGHT (ic))->rematiCode; - ptr_type = DCL_TYPE(from_type); - if (ptr_type == IPOINTER) { - // bug #481053 - ptr_type = POINTER; - } - continue ; + ptr_type = pointerTypeToGPByte (DCL_TYPE(from_type), NULL, NULL); + continue; } else break; ic = OP_SYMBOL (IC_LEFT (ic))->rematiCode; @@ -1936,10 +1932,10 @@ genCpl (iCode * ic) */ werror(W_COMPLEMENT); emitcode ("setb", "%s", IC_RESULT (ic)->aop->aopu.aop_dir); - goto release; - } - tlbl=newiTempLabel(NULL); - l = aopGet (AOP (IC_LEFT (ic)), offset++, FALSE, FALSE,NULL); + goto release; + } + tlbl=newiTempLabel(NULL); + l = aopGet (AOP (IC_LEFT (ic)), offset++, FALSE, FALSE, NULL); if (AOP_TYPE (IC_LEFT (ic)) == AOP_ACC || AOP_TYPE (IC_LEFT (ic)) == AOP_REG || IS_AOP_PREG (IC_LEFT (ic))) @@ -1951,10 +1947,10 @@ genCpl (iCode * ic) MOVA (l); emitcode ("cjne", "a,#0xFF,%05d$", tlbl->key + 100); } - emitcode ("", "%05d$:", tlbl->key+100); - outBitC (IC_RESULT(ic)); - goto release; - } + emitcode ("", "%05d$:", tlbl->key+100); + outBitC (IC_RESULT(ic)); + goto release; + } size = AOP_SIZE (IC_RESULT (ic)); _startLazyDPSEvaluation (); @@ -1989,7 +1985,7 @@ genUminusFloat (operand * op, operand * result) size = AOP_SIZE (op) - 1; while (size--) - { + { aopPut (AOP (result), aopGet (AOP (op), offset, FALSE, FALSE, NULL), offset); @@ -4007,7 +4003,7 @@ adjustArithmeticResult (iCode * ic) { char buff[5]; SNPRINTF (buff, sizeof(buff), - "#%d", pointerCode (getSpec (operandType (IC_LEFT (ic))))); + "#%d", pointerTypeToGPByte (pointerCode (getSpec (operandType (IC_LEFT (ic)))), NULL, NULL)); aopPut (AOP (IC_RESULT (ic)), buff, GPTRSIZE - 1); } } @@ -11725,7 +11721,7 @@ genCast (iCode * ic) exit(1); } - SNPRINTF(gpValStr, sizeof(gpValStr), "#0x%d", gpVal); + SNPRINTF(gpValStr, sizeof(gpValStr), "#0x%x", gpVal); aopPut (AOP (result), gpValStr, GPTRSIZE - 1); } goto release;