#define SYM_BP(sym) (SPEC_OCLS (sym->etype)->paged ? "_bpx" : "_bp")
#define R0INB _G.bu.bs.r0InB
-#define R1INB _G.bu.bs.r1InB
-#define OPINB _G.bu.bs.OpInB
-#define BINUSE _G.bu.BInUse
+#define R1INB _G.bu.bs.r1InB
+#define OPINB _G.bu.bs.OpInB
+#define BINUSE _G.bu.BInUse
static struct
{
else
tvsprintf (lb, sizeof(lb), fmt, ap);
- while (isspace (*lbp))
+ while (isspace ((unsigned char)*lbp))
lbp++;
if (lbp && *lbp)
aop->aopu.aop_immd.from_cast_remat = 1;
ic = OP_SYMBOL (IC_RIGHT (ic))->rematiCode;
ptr_type = pointerTypeToGPByte (DCL_TYPE(from_type), NULL, NULL);
- continue ;
+ continue;
} else break;
ic = OP_SYMBOL (IC_LEFT (ic))->rematiCode;
else
{
bool bits_pushed = FALSE;
- for (i = 0; i < mcs51_nRegs; i++)
- {
- if (bitVectBitValue (rsave, i))
+ for (i = 0; i < mcs51_nRegs; i++)
+ {
+ if (bitVectBitValue (rsave, i))
{
bits_pushed = pushReg (i, bits_pushed);
}
}
- }
+ }
}
/*-----------------------------------------------------------------*/
else
{
bool bits_popped = FALSE;
- for (i = mcs51_nRegs; i >= 0; i--)
- {
- if (bitVectBitValue (rsave, i))
+ for (i = mcs51_nRegs; i >= 0; i--)
+ {
+ if (bitVectBitValue (rsave, i))
{
bits_popped = popReg (i, bits_popped);
}
}
- }
+ }
}
/*-----------------------------------------------------------------*/
-/* pushSide - */
+/* pushSide - */
/*-----------------------------------------------------------------*/
static void
pushSide (operand * oper, int size)
strcmp (l, "a"))
{
if (strcmp (l, prev) || *l == '@')
- MOVA (l);
+ MOVA (l);
emitcode ("push", "acc");
}
else
/*-----------------------------------------------------------------*/
static void genSend(set *sendSet)
{
- iCode *sic;
+ iCode *sic;
int bit_count = 0;
/* first we do all bit parameters */
- for (sic = setFirstItem (sendSet); sic;
+ for (sic = setFirstItem (sendSet); sic;
sic = setNextItem (sendSet))
{
aopOp (IC_LEFT (sic), sic, FALSE);
for (sic = setFirstItem (sendSet); sic;
sic = setNextItem (sendSet))
{
- int size, offset = 0;
- aopOp (IC_LEFT (sic), sic, FALSE);
- size = AOP_SIZE (IC_LEFT (sic));
+ int size, offset = 0;
+ aopOp (IC_LEFT (sic), sic, FALSE);
+ size = AOP_SIZE (IC_LEFT (sic));
if (sic->argreg == 1)
{
while (size--)
{
char *l = aopGet (IC_LEFT (sic), offset, FALSE, FALSE);
- if (strcmp (l, fReturn[offset]))
- emitcode ("mov", "%s,%s", fReturn[offset], l);
- offset++;
- }
+ if (strcmp (l, fReturn[offset]))
+ emitcode ("mov", "%s,%s", fReturn[offset], l);
+ offset++;
+ }
}
else if (sic->argreg <= 12)
{
emitcode ("mov","%s,%s", rb1regs[sic->argreg+offset-5],
aopGet (IC_LEFT (sic), offset,FALSE, FALSE));
offset++;
- }
- }
- freeAsmop (IC_LEFT (sic), NULL, sic, TRUE);
+ }
+ }
+ freeAsmop (IC_LEFT (sic), NULL, sic, TRUE);
}
}
if (currFunc && dtype && !IFFUNC_ISNAKED(dtype) &&
(FUNC_REGBANK (currFunc->type) != FUNC_REGBANK (dtype)) &&
!IFFUNC_ISISR (dtype))
- {
+ {
swapBanks = TRUE;
- }
+ }
/* if caller saves & we have not saved then */
if (!ic->regsSaved)
saveRegisters (ic);
if (swapBanks)
- {
+ {
emitcode ("mov", "psw,#0x%02x",
((FUNC_REGBANK(dtype)) << 3) & 0xff);
- }
+ }
/* make the call */
if (IFFUNC_ISBANKEDCALL (dtype) && !SPEC_STAT(getSpec(dtype)))
if (currFunc && dtype && !IFFUNC_ISNAKED(dtype) &&
(FUNC_REGBANK (currFunc->type) != FUNC_REGBANK (dtype)) &&
!IFFUNC_ISISR (dtype))
- {
+ {
// saveRBank (FUNC_REGBANK (dtype), ic, TRUE);
// restoreBank=TRUE;
swapBanks = TRUE;
if (!offset && !size && lit== (unsigned long) -1) {
emitcode ("dec", "a");
} else if (!useCarry) {
- /* first add without previous c */
+ /* first add without previous c */
emitcode ("add", "a,#0x%02x",
(unsigned int) ((lit >> (offset * 8)) & 0x0FFL));
useCarry = TRUE;
- } else {
- emitcode ("addc", "a,#0x%02x",
- (unsigned int) ((lit >> (offset * 8)) & 0x0FFL));
- }
+ } else {
+ emitcode ("addc", "a,#0x%02x",
+ (unsigned int) ((lit >> (offset * 8)) & 0x0FFL));
+ }
aopPut (IC_RESULT (ic), "a", offset++, isOperandVolatile (IC_RESULT (ic), FALSE));
} else {
/* no need to add zeroes */
aopOp (right, ic, FALSE);
aopOp (result, ic, TRUE);
- genCmp (left, right, result, ifx, sign,ic);
+ genCmp (left, right, result, ifx, sign, ic);
freeAsmop (result, NULL, ic, TRUE);
}
MOVA (aopGet (right, offset, FALSE, FALSE));
emitcode("anl", "a,b");
}
- } else {
+ } else {
MOVA (aopGet (right, offset, FALSE, FALSE));
- emitcode ("anl", "a,%s",
+ emitcode ("anl", "a,%s",
aopGet (left, offset, FALSE, FALSE));
+ }
}
- }
emitcode ("jnz", "%05d$", tlbl->key + 100);
offset++;
}
else
{
/* Add \n for labels, not dirs such as c:\mydir */
- if ( (*bp == ':') && (isspace(bp[1])) )
+ if ( (*bp == ':') && (isspace((unsigned char)bp[1])) )
{
bp++;
*bp = '\0';
static void
genReceive (iCode * ic)
{
- int size = getSize (operandType (IC_RESULT (ic)));
- int offset = 0;
+ int size = getSize (operandType (IC_RESULT (ic)));
+ int offset = 0;
D(emitcode ("; genReceive",""));