changed temporary ICODE buffer in disassem.cpp from ICODE * to CIcodeRec
This commit is contained in:
parent
cd040363e6
commit
5c55f990b7
@ -170,7 +170,7 @@ void BackEnd(char *filename, CALL_GRAPH *); /* backend.c */
|
||||
char *cChar(byte c); /* backend.c */
|
||||
Int scan(dword ip, ICODE * p); /* scanner.c */
|
||||
void parse (CALL_GRAPH * *); /* parser.c */
|
||||
boolT labelSrch(ICODE * pIc, Int n, dword tg, Int *pIdx); /* parser.c */
|
||||
boolT labelSrch(CIcodeRec &pIc, Int n, dword tg, Int *pIdx); /* parser.c */
|
||||
Int strSize (byte *, char); /* parser.c */
|
||||
void disassem(Int pass, Function * pProc); /* disassem.c */
|
||||
void interactDis(Function * initProc, Int initIC); /* disassem.c */
|
||||
|
||||
@ -573,7 +573,7 @@ static boolT xClear (COND_EXPR *rhs, Int f, Int t, Int lastBBinst, Function * pp
|
||||
case IDENTIFIER:
|
||||
if (rhs->expr.ident.idType == REGISTER)
|
||||
{
|
||||
picode = pproc->Icode.GetFirstIcode();
|
||||
picode = &pproc->Icode.front();
|
||||
regi= pproc->localId.id_arr[rhs->expr.ident.idNode.regiIdx].id.regi;
|
||||
for (i = (f + 1); (i < lastBBinst) && (i < t); i++)
|
||||
if ((picode[i].type == HIGH_LEVEL) &&
|
||||
@ -703,8 +703,7 @@ void Function::findExps()
|
||||
(ticode->ic.hl.opcode != HLI_RET)))
|
||||
continue;
|
||||
|
||||
if (xClear (picode->ic.hl.oper.asgn.rhs, j,
|
||||
picode->du1.idx[0][0], lastInst, this))
|
||||
if (xClear (picode->ic.hl.oper.asgn.rhs, j, picode->du1.idx[0][0], lastInst, this))
|
||||
{
|
||||
switch (ticode->ic.hl.opcode) {
|
||||
case HLI_ASSIGN:
|
||||
|
||||
@ -138,7 +138,7 @@ static void flops(ICODE * pi);
|
||||
boolT callArg(word off, char *temp); /* Check for procedure name */
|
||||
|
||||
static FILE *fp;
|
||||
static ICODE * pc;
|
||||
static CIcodeRec pc;
|
||||
static char buf[200], *p;
|
||||
static Int cb, j, numIcode, allocIcode, eop;
|
||||
static vector<int> pl;
|
||||
@ -199,10 +199,10 @@ void disassem(Int pass, Function * ppProc)
|
||||
fatalError(CANNOT_OPEN, p);
|
||||
}
|
||||
}
|
||||
|
||||
pc=pProc->Icode;
|
||||
/* Create temporary code array */
|
||||
// Mike: needs objectising!
|
||||
pc = (ICODE *)memcpy(allocMem(cb), pProc->Icode.GetFirstIcode(), (size_t)cb);
|
||||
//pc = (ICODE *)memcpy(allocMem(cb), pProc->Icode.GetFirstIcode(), (size_t)cb);
|
||||
|
||||
if (pass == 1)
|
||||
{
|
||||
@ -249,7 +249,7 @@ void disassem(Int pass, Function * ppProc)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
free(pc);
|
||||
pc.clear();
|
||||
destroySymTables();
|
||||
}
|
||||
|
||||
|
||||
@ -687,7 +687,8 @@ static hlType cbType[] = {TYPE_UNKNOWN, TYPE_BYTE_UNSIGN, TYPE_WORD_SIGN,
|
||||
* is checked and updated if the old size was less than the new size (ie.
|
||||
* the maximum size is always saved). */
|
||||
static SYM * updateGlobSym (dword operand, Int size, word duFlag)
|
||||
{ Int i;
|
||||
{
|
||||
Int i;
|
||||
|
||||
/* Check for symbol in symbol table */
|
||||
for (i = 0; i < symtab.csym; i++)
|
||||
@ -849,7 +850,7 @@ void STATE::setState(word reg, int16 value)
|
||||
|
||||
/* labelSrchRepl - Searches Icode for instruction with label = target, and
|
||||
replaces *pIndex with an icode index */
|
||||
boolT labelSrch(ICODE *pIcode, Int numIp, dword target, Int *pIndex)
|
||||
boolT labelSrch(CIcodeRec &pIcode, Int numIp, dword target, Int *pIndex)
|
||||
{
|
||||
Int i;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user