Made everything static
-------------------------------------------------------------------------*/
-//#define D(x)
-#define D(x) x
+#define D(x) do if (!options.noVerboseAsm) {x;} while(0)
#include <stdio.h>
#include <stdlib.h>
#include "common.h"
#include "SDCCpeeph.h"
#include "ralloc.h"
+#include "rtrack.h"
#include "gen.h"
+#include "dbuf_string.h"
char *aopLiteral (value * val, int offset);
char *aopLiteralLong (value * val, int offset, int size);
"b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7"
};
-extern FILE *codeOutFile;
-static void saveRBank (int, iCode *, bool);
+extern struct dbuf_s *codeOutBuf;
#define RESULTONSTACK(x) \
(IC_RESULT(x) && IC_RESULT(x)->aop && \
/*-----------------------------------------------------------------*/
/* emitcode - writes the code into a file : for now it is simple */
/*-----------------------------------------------------------------*/
-static void
-emitcode (char *inst, const char *fmt,...)
+void
+emitcode (const char *inst, const char *fmt,...)
{
va_list ap;
- char lb[INITIAL_INLINEASM];
- char *lbp = lb;
+ struct dbuf_s dbuf;
+ const char *lbp, *lb;
+
+ dbuf_init (&dbuf, INITIAL_INLINEASM);
va_start (ap, fmt);
if (inst && *inst)
{
+ dbuf_append_str (&dbuf, inst);
+
if (fmt && *fmt)
{
- SNPRINTF (lb, sizeof(lb), "%s\t", inst);
- }
- else
- {
- SNPRINTF (lb, sizeof(lb), "%s", inst);
+ dbuf_append_char (&dbuf, '\t');
+ dbuf_tvprintf (&dbuf, fmt, ap);
}
-
- tvsprintf (lb + strlen(lb), sizeof(lb) - strlen(lb), fmt, ap);
}
else
{
- tvsprintf (lb, sizeof(lb), fmt, ap);
+ dbuf_tvprintf (&dbuf, fmt, ap);
}
+ lbp = lb = dbuf_c_str(&dbuf);
+
while (isspace ((unsigned char)*lbp))
{
lbp++;
if (lbp && *lbp)
{
+ rtrackUpdate (lbp);
+
lineCurr = (lineCurr ?
connectLine (lineCurr, newLineNode (lb)) :
(lineHead = newLineNode (lb)));
lineCurr->ic = _G.current_iCode;
lineCurr->isComment = (*lbp==';');
va_end (ap);
+
+ dbuf_destroy(&dbuf);
}
static void
emitLabel (symbol *tlbl)
{
emitcode ("", "%05d$:", tlbl->key + 100);
+ lineCurr->isLabel = 1;
}
/*-----------------------------------------------------------------*/
if (!strncmp(x, "a", 2) || !strncmp(x, "acc", 4))
return;
+ /* if it is a literal mov try to get it cheaper */
+ if (*x == '#' &&
+ rtrackMoveALit(x))
+ return;
+
emitcode("mov", "a,%s", x);
}
if (!strncmp(x, "b", 2))
return;
- emitcode("mov","b,%s", x);
-}
-
-/*-----------------------------------------------------------------*/
-/* movc - moves specified value into the carry */
-/*-----------------------------------------------------------------*/
-static void
-movc (const char *s)
-{
- if (s == zero)
- CLRC;
- else if (s == one)
- SETC;
- else if (strcmp (s, "c"))
- {/* it's not in carry already */
- MOVA (s);
- /* set C, if a >= 1 */
- emitcode ("add", "a,#0xff");
+ /* if it is a literal mov try to get it cheaper */
+ if (*x == '#')
+ {
+ emitcode("mov","b,%s", rtrackGetLit(x));
+ return;
}
+
+ emitcode("mov","b,%s", x);
}
/*-----------------------------------------------------------------*/
/* if the type is a conditional */
if (sym->regType == REG_CND)
{
- aop = op->aop = sym->aop = newAsmop (AOP_CRY);
- aop->size = 0;
+ sym->aop = op->aop = aop = newAsmop (AOP_CRY);
+ aop->size = sym->ruonly ? 1 : 0;
return;
}
if (sym->accuse)
{
int i;
- aop = op->aop = sym->aop = newAsmop (AOP_ACC);
+ sym->aop = op->aop = aop = newAsmop (AOP_ACC);
aop->size = getSize (sym->type);
for (i = 0; i < 2; i++)
aop->aopu.aop_str[i] = accUse[i];
{
unsigned i;
- aop = op->aop = sym->aop = newAsmop (AOP_STR);
+ sym->aop = op->aop = aop = newAsmop (AOP_STR);
aop->size = getSize (sym->type);
for (i = 0; i < fReturnSizeMCS51; i++)
aop->aopu.aop_str[i] = fReturn[i];
return aop->aopu.aop_reg[offset]->name;
case AOP_CRY:
- emitcode ("clr", "a");
emitcode ("mov", "c,%s", aop->aopu.aop_dir);
+ emitcode ("clr", "a");
emitcode ("rlc", "a");
return (dname ? "acc" : "a");
case AOP_STK:
if (strcmp (s, "a") == 0)
- emitcode ("push", "acc");
- else
- if (*s=='@') {
+ {
+ emitcode ("push", "acc");
+ }
+ else if (*s=='@')
+ {
MOVA(s);
emitcode ("push", "acc");
- } else {
+ }
+ else if (strcmp (s, "r0") == 0 ||
+ strcmp (s, "r1") == 0 ||
+ strcmp (s, "r2") == 0 ||
+ strcmp (s, "r3") == 0 ||
+ strcmp (s, "r4") == 0 ||
+ strcmp (s, "r5") == 0 ||
+ strcmp (s, "r6") == 0 ||
+ strcmp (s, "r7") == 0)
+ {
+ char buffer[10];
+ SNPRINTF (buffer, sizeof(buffer), "a%s", s);
+ emitcode ("push", buffer);
+ }
+ else
+ {
emitcode ("push", s);
}
break;
case AOP_CRY:
- /* if not bit variable */
+ /* if result no bit variable */
if (!aop->aopu.aop_dir)
{
+ assert (!strcmp (s, "c"));
/* inefficient: move carry into A and use jz/jnz */
emitcode ("clr", "a");
emitcode ("rlc", "a");
accuse = TRUE;
}
- else
+ else if (s == zero)
+ emitcode ("clr", "%s", aop->aopu.aop_dir);
+ else if (s == one)
+ emitcode ("setb", "%s", aop->aopu.aop_dir);
+ else if (!strcmp (s, "c"))
+ emitcode ("mov", "%s,c", aop->aopu.aop_dir);
+ else if (strcmp (s, aop->aopu.aop_dir))
{
- if (s == zero)
- emitcode ("clr", "%s", aop->aopu.aop_dir);
- else if (s == one)
- emitcode ("setb", "%s", aop->aopu.aop_dir);
- else if (!strcmp (s, "c"))
- emitcode ("mov", "%s,c", aop->aopu.aop_dir);
- else if (strcmp (s, aop->aopu.aop_dir))
- {
- MOVA (s);
- /* set C, if a >= 1 */
- emitcode ("add", "a,#0xff");
- emitcode ("mov", "%s,c", aop->aopu.aop_dir);
- }
+ MOVA (s);
+ /* set C, if a >= 1 */
+ emitcode ("add", "a,#0xff");
+ emitcode ("mov", "%s,c", aop->aopu.aop_dir);
}
break;
/* if the result is bit */
if (AOP_TYPE (result) == AOP_CRY)
{
- aopPut (result, "c", 0);
+ if (!OP_SYMBOL (result)->ruonly)
+ aopPut (result, "c", 0);
}
else
{
}
}
+/*-----------------------------------------------------------------*/
+/* toCarry - make boolean and move into carry */
+/*-----------------------------------------------------------------*/
+static void
+toCarry (operand * oper)
+{
+ /* if the operand is a literal then
+ we know what the value is */
+ if (AOP_TYPE (oper) == AOP_LIT)
+ {
+ if ((int) operandLitValue (oper))
+ SETC;
+ else
+ CLRC;
+ }
+ else if (AOP_TYPE (oper) == AOP_CRY)
+ {
+ emitcode ("mov", "c,%s", oper->aop->aopu.aop_dir);
+ }
+ else
+ {
+ /* or the operand into a */
+ toBoolean (oper);
+ /* set C, if a >= 1 */
+ emitcode ("add", "a,#0xff");
+ }
+}
+
+/*-----------------------------------------------------------------*/
+/* assignBit - assign operand to bit operand */
+/*-----------------------------------------------------------------*/
+static void
+assignBit (operand * result, operand * right)
+{
+ /* if the right side is a literal then
+ we know what the value is */
+ if (AOP_TYPE (right) == AOP_LIT)
+ {
+ if ((int) operandLitValue (right))
+ aopPut (result, one, 0);
+ else
+ aopPut (result, zero, 0);
+ }
+ else
+ {
+ toCarry (right);
+ aopPut (result, "c", 0);
+ }
+}
+
/*-------------------------------------------------------------------*/
/* xch_a_aopGet - for exchanging acc with value of the aop */
rsave = bitVectCplAnd (rsave, rsavebits);
rsave = bitVectSetBit (rsave, bitVectFirstBit (rsavebits));
}
+ freeBitVect (rsavebits);
if (count == 1)
{
}
}
}
+ freeBitVect (rsave);
}
/*-----------------------------------------------------------------*/
rsave = bitVectCplAnd (rsave, rsavebits);
rsave = bitVectSetBit (rsave, bitVectFirstBit (rsavebits));
}
+ freeBitVect (rsavebits);
if (count == 1)
{
}
}
}
+ freeBitVect (rsave);
}
saveRBank (int bank, iCode * ic, bool pushPsw)
{
int i;
- int count = 8 + ((mcs51_nRegs > 8) ? 1 : 0) + (pushPsw ? 1 : 0);
+ int count = 8 + (pushPsw ? 1 : 0);
asmop *aop = NULL;
regs *r = NULL;
if (!ic)
{
/* Assume r0 is available for use. */
- r = REG_WITH_INDEX (R0_IDX);;
+ r = REG_WITH_INDEX (R0_IDX);
}
else
{
regs8051[i].base, 8 * bank + regs8051[i].offset);
}
- if (mcs51_nRegs > 8)
- {
- if (options.useXstack)
- {
- emitcode ("mov", "a,bits");
- emitcode ("movx", "@%s,a", r->name);
- if (--count)
- emitcode ("inc", "%s", r->name);
- }
- else
- {
- emitcode ("push", "bits");
- }
- BitBankUsed = 1;
- }
-
if (pushPsw)
{
if (options.useXstack)
}
}
- if (mcs51_nRegs > 8)
- {
- if (options.useXstack)
- {
- emitcode ("dec", "%s", r->name);
- emitcode ("movx", "a,@%s", r->name);
- emitcode ("mov", "bits,a");
- }
- else
- {
- emitcode ("pop", "bits");
- }
- }
-
for (i = 7; i >= 0; i--)
{
if (options.useXstack)
else
emitcode ("clr", "b[%d]", bit);
}
- else if (AOP_TYPE (IC_LEFT (sic)) == AOP_CRY)
- {
- char *l = AOP (IC_LEFT (sic))->aopu.aop_dir;
- if (strcmp (l, "c"))
- emitcode ("mov", "c,%s", l);
- emitcode ("mov", "b[%d],c", bit);
- }
else
{
/* we need to or */
- toBoolean (IC_LEFT (sic));
- /* set C, if a >= 1 */
- emitcode ("add", "a,#0xff");
+ toCarry (IC_LEFT (sic));
emitcode ("mov", "b[%d],c", bit);
}
bit_count++;
/* if we are calling a not _naked function that is not using
the same register bank then we need to save the
destination registers on the stack */
- if (currFunc && dtype && !IFFUNC_ISNAKED(dtype) &&
+ if (currFunc && dtype && !IFFUNC_ISNAKED (dtype) &&
(FUNC_REGBANK (currFunc->type) != FUNC_REGBANK (dtype)) &&
!IFFUNC_ISISR (dtype))
{
// need caution message to user here
}
- if (IS_LITERAL(etype))
+ if (IS_LITERAL (etype))
{
/* if send set is not empty then assign */
if (_G.sendSet)
if (swapBanks)
{
emitcode ("mov", "psw,#0x%02x",
- ((FUNC_REGBANK(dtype)) << 3) & 0xff);
+ ((FUNC_REGBANK (dtype)) << 3) & 0xff);
}
- if (IFFUNC_ISBANKEDCALL (dtype) && !SPEC_STAT(getSpec(dtype)))
+ if (IFFUNC_ISBANKEDCALL (dtype) && !SPEC_STAT (getSpec(dtype)))
{
- if (IFFUNC_CALLEESAVES(dtype))
+ if (IFFUNC_CALLEESAVES (dtype))
{
werror (E_BANKED_WITH_CALLEESAVES);
}
}
else
{
- if (IFFUNC_ISBANKEDCALL (dtype) && !SPEC_STAT(getSpec(dtype)))
+ if (IFFUNC_ISBANKEDCALL (dtype) && !SPEC_STAT (getSpec(dtype)))
{
- if (IFFUNC_CALLEESAVES(dtype))
+ if (IFFUNC_CALLEESAVES (dtype))
{
werror (E_BANKED_WITH_CALLEESAVES);
}
if (!swapBanks)
{
+ /* what if aopGet needs r0 or r1 ??? */
emitcode ("mov", "ar0,%s", aopGet(IC_LEFT (ic), 0, FALSE, FALSE));
emitcode ("mov", "ar1,%s", aopGet(IC_LEFT (ic), 1, FALSE, FALSE));
emitcode ("mov", "ar2,%s", aopGet(IC_LEFT (ic), 2, FALSE, FALSE));
if (swapBanks)
{
emitcode ("mov", "psw,#0x%02x",
- ((FUNC_REGBANK(dtype)) << 3) & 0xff);
+ ((FUNC_REGBANK (dtype)) << 3) & 0xff);
}
/* make the call */
emitcode ("lcall", "__sdcc_banked_call");
}
}
- else
+ else if (_G.sendSet)
{
/* push the return address on to the stack */
emitcode ("mov", "a,#%05d$", (rlbl->key + 100));
if (swapBanks)
{
emitcode ("mov", "psw,#0x%02x",
- ((FUNC_REGBANK(dtype)) << 3) & 0xff);
+ ((FUNC_REGBANK (dtype)) << 3) & 0xff);
}
/* make the call */
emitcode ("ret", "");
emitLabel (rlbl);
}
+ else /* the send set is empty */
+ {
+ char *l;
+ /* now get the calling address into dptr */
+ aopOp (IC_LEFT (ic), ic, FALSE);
+
+ l = aopGet (IC_LEFT (ic), 0, FALSE, FALSE);
+ if (AOP_TYPE (IC_LEFT (ic)) == AOP_DPTR)
+ {
+ emitcode ("mov", "r0,%s", l);
+ l = aopGet (IC_LEFT (ic), 1, FALSE, FALSE);
+ emitcode ("mov", "dph,%s", l);
+ emitcode ("mov", "dpl,r0");
+ }
+ else
+ {
+ emitcode ("mov", "dpl,%s", l);
+ l = aopGet (IC_LEFT (ic), 1, FALSE, FALSE);
+ emitcode ("mov", "dph,%s", l);
+ }
+
+ freeAsmop (IC_LEFT (ic), NULL, ic, TRUE);
+
+ if (swapBanks)
+ {
+ emitcode ("mov", "psw,#0x%02x",
+ ((FUNC_REGBANK (dtype)) << 3) & 0xff);
+ }
+
+ /* make the call */
+ emitcode ("lcall", "__sdcc_call_dptr");
+ }
}
if (swapBanks)
{
- selectRegBank (FUNC_REGBANK(currFunc->type), IS_BIT (etype));
+ selectRegBank (FUNC_REGBANK (currFunc->type), IS_BIT (etype));
}
/* if we need assign a result value */
// unsaveRBank (FUNC_REGBANK (dtype), ic, TRUE);
/* if we had saved some registers then unsave them */
- if (ic->regsSaved && !IFFUNC_CALLEESAVES(dtype))
+ if (ic->regsSaved && !IFFUNC_CALLEESAVES (dtype))
unsaveRegisters (ic);
if (IS_BIT (OP_SYM_ETYPE (IC_RESULT (ic))))
return 0;
}
-#if defined(__BORLANDC__) || defined(_MSC_VER)
-#define STRCASECMP stricmp
-#else
-#define STRCASECMP strcasecmp
-#endif
-
/*-----------------------------------------------------------------*/
/* inExcludeList - return 1 if the string is in exclude Reg list */
/*-----------------------------------------------------------------*/
emitcode (";", "-----------------------------------------");
emitcode ("", "%s:", sym->rname);
+ lineCurr->isLabel = 1;
ftype = operandType (IC_LEFT (ic));
_G.currentFunc = sym;
save acc, b, dpl, dph */
if (IFFUNC_ISISR (sym->type))
{
+ bitVect *rsavebits;
+
+ rsavebits = bitVectIntersect (bitVectCopy (mcs51_allBitregs ()), sym->regsUsed);
+ if (IFFUNC_HASFCALL(sym->type) || !bitVectIsZero (rsavebits))
+ {
+ emitcode ("push", "bits");
+ BitBankUsed = 1;
+ }
+ freeBitVect (rsavebits);
+
if (!inExcludeList ("acc"))
emitcode ("push", "acc");
if (!inExcludeList ("b"))
/* if any registers used */
if (sym->regsUsed)
{
- bool bits_pushed = FALSE;
/* save the registers used */
for (i = 0; i < sym->regsUsed->size; i++)
{
if (bitVectBitValue (sym->regsUsed, i))
- bits_pushed = pushReg (i, bits_pushed);
+ pushReg (i, TRUE);
}
}
}
if (IFFUNC_ISISR (sym->type))
{
+ bitVect *rsavebits;
/* now we need to restore the registers */
/* if this isr has no bank i.e. is going to
/* if any registers used */
if (sym->regsUsed)
{
- bool bits_popped = FALSE;
/* save the registers used */
for (i = sym->regsUsed->size; i >= 0; i--)
{
if (bitVectBitValue (sym->regsUsed, i))
- bits_popped = popReg (i, bits_popped);
+ popReg (i, TRUE);
}
}
}
emitcode ("pop","%s",rb1regs[i]);
}
}
- /* this function has a function call cannot
- determines register usage so we will have to pop the
+ /* this function has a function call. We cannot
+ determine register usage so we will have to pop the
entire bank */
unsaveRBank (0, ic, FALSE);
}
if (!inExcludeList ("acc"))
emitcode ("pop", "acc");
+ rsavebits = bitVectIntersect (bitVectCopy (mcs51_allBitregs ()), sym->regsUsed);
+ if (IFFUNC_HASFCALL(sym->type) || !bitVectIsZero (rsavebits))
+ emitcode ("pop", "bits");
+ freeBitVect (rsavebits);
+
/* if debug then send end of function */
if (options.debug && currFunc)
{
if (IS_BIT(_G.currentFunc->etype))
{
- movc (aopGet (IC_LEFT (ic), 0, FALSE, FALSE));
- size = 0;
+ if (!OP_SYMBOL (IC_LEFT (ic))->ruonly)
+ toCarry (IC_LEFT (ic));
}
-
- while (size--)
+ else
{
- char *l;
- if (AOP_TYPE (IC_LEFT (ic)) == AOP_DPTR)
+ while (size--)
{
- /* #NOCHANGE */
- l = aopGet (IC_LEFT (ic), offset++,
- FALSE, TRUE);
- emitcode ("push", "%s", l);
- pushed++;
+ char *l;
+ if (AOP_TYPE (IC_LEFT (ic)) == AOP_DPTR)
+ {
+ /* #NOCHANGE */
+ l = aopGet (IC_LEFT (ic), offset++, FALSE, TRUE);
+ emitcode ("push", "%s", l);
+ pushed++;
+ }
+ else
+ {
+ l = aopGet (IC_LEFT (ic), offset, FALSE, FALSE);
+ if (strcmp (fReturn[offset], l))
+ emitcode ("mov", "%s,%s", fReturn[offset++], l);
+ }
}
- else
+
+ while (pushed)
{
- l = aopGet (IC_LEFT (ic), offset,
- FALSE, FALSE);
- if (strcmp (fReturn[offset], l))
- emitcode ("mov", "%s,%s", fReturn[offset++], l);
+ pushed--;
+ if (strcmp (fReturn[pushed], "a"))
+ emitcode ("pop", fReturn[pushed]);
+ else
+ emitcode ("pop", "acc");
}
}
-
- while (pushed)
- {
- pushed--;
- if (strcmp (fReturn[pushed], "a"))
- emitcode ("pop", fReturn[pushed]);
- else
- emitcode ("pop", "acc");
- }
freeAsmop (IC_LEFT (ic), NULL, ic, TRUE);
jumpret:
if (IC_LABEL (ic) == entryLabel)
return;
- emitcode ("", "%05d$:", (IC_LABEL (ic)->key + 100));
+ emitLabel (IC_LABEL (ic));
}
/*-----------------------------------------------------------------*/
{
D (emitcode (";", "genPlusBits"));
+ emitcode ("mov", "c,%s", AOP (IC_LEFT (ic))->aopu.aop_dir);
if (AOP_TYPE (IC_RESULT (ic)) == AOP_CRY)
{
symbol *lbl = newiTempLabel (NULL);
- emitcode ("mov", "c,%s", AOP (IC_LEFT (ic))->aopu.aop_dir);
emitcode ("jnb", "%s,%05d$", AOP (IC_RIGHT (ic))->aopu.aop_dir, (lbl->key + 100));
emitcode ("cpl", "c");
emitLabel (lbl);
else
{
emitcode ("clr", "a");
- emitcode ("mov", "c,%s", AOP (IC_LEFT (ic))->aopu.aop_dir);
emitcode ("rlc", "a");
emitcode ("mov", "c,%s", AOP (IC_RIGHT (ic))->aopu.aop_dir);
emitcode ("addc", "a,%s", zero);
{
/* moving to accumulator first helps peepholes */
MOVA (aopGet (left, 0, FALSE, FALSE));
- emitcode ("mov", "b,%s", aopGet (right, 0, FALSE, FALSE));
+ MOVB (aopGet (right, 0, FALSE, FALSE));
}
else
{
if (lUnsigned && rUnsigned)
{
/* unsigned is easy */
- emitcode ("mov", "b,%s", aopGet (right, 0, FALSE, FALSE));
+ MOVB (aopGet (right, 0, FALSE, FALSE));
MOVA (aopGet (left, 0, FALSE, FALSE));
emitcode ("div", "ab");
aopPut (result, "a", 0);
if (lUnsigned && rUnsigned)
{
/* unsigned is easy */
- emitcode ("mov", "b,%s", aopGet (right, 0, FALSE, FALSE));
+ MOVB (aopGet (right, 0, FALSE, FALSE));
MOVA (aopGet (left, 0, FALSE, FALSE));
emitcode ("div", "ab");
aopPut (result, "b", 0);
// val = c
if (size)
outBitC (result);
- // if(bit | ...)
+ // if(bit ^ ...)
else if ((AOP_TYPE (result) == AOP_CRY) && ifx)
genIfxJump (ifx, "c", left, right, result);
goto release;
/* if the result is a bit */
if (AOP_TYPE (result) == AOP_CRY)
{
- /* if the right size is a literal then
- we know what the value is */
- if (AOP_TYPE (right) == AOP_LIT)
- {
- if (((int) operandLitValue (right)))
- aopPut (result, one, 0);
- else
- aopPut (result, zero, 0);
- goto release;
- }
-
- /* the right is also a bit variable */
- if (AOP_TYPE (right) == AOP_CRY)
- {
- emitcode ("mov", "c,%s", AOP (right)->aopu.aop_dir);
- aopPut (result, "c", 0);
- goto release;
- }
-
- /* we need to or */
- toBoolean (right);
- aopPut (result, "a", 0);
+ assignBit (result, right);
goto release;
}
/* if the result is a bit (and not a bitfield) */
if (IS_BIT (OP_SYMBOL (result)->type))
{
- /* if the right size is a literal then
- we know what the value is */
- if (AOP_TYPE (right) == AOP_LIT)
- {
- if (((int) operandLitValue (right)))
- aopPut (result, one, 0);
- else
- aopPut (result, zero, 0);
-
- goto release;
- }
-
- /* the right is also a bit variable */
- if (AOP_TYPE (right) == AOP_CRY)
- {
- emitcode ("mov", "c,%s", AOP (right)->aopu.aop_dir);
- aopPut (result, "c", 0);
- goto release;
- }
-
- /* we need to or */
- toBoolean (right);
- aopPut (result, "a", 0);
+ assignBit (result, right);
goto release;
}
/* print the allocation information */
if (allocInfo && currFunc)
- printAllocInfo (currFunc, codeOutFile);
+ printAllocInfo (currFunc, codeOutBuf);
/* if debug information required */
if (options.debug && currFunc)
{
if (options.iCodeInAsm) {
char regsInUse[80];
int i;
+ char *iLine;
#if 0
for (i=0; i<8; i++) {
}
#endif
}
+ iLine = printILine(ic);
emitcode("", "; [%s] ic:%d: %s", regsInUse, ic->seq, printILine(ic));
+ dbuf_free(iLine);
}
/* if the result is marked as
spilt and rematerializable or code for
peepHole (&lineHead);
/* now do the actual printing */
- printLine (lineHead, codeOutFile);
+ printLine (lineHead, codeOutBuf);
return;
}