More tabs replaced with spaces

This commit is contained in:
nemerle 2016-05-06 15:57:15 +02:00
parent 59c199837c
commit 888de8d35e
34 changed files with 671 additions and 678 deletions

View File

@ -52,8 +52,8 @@ private:
/* Procedure FLAGS */ /* Procedure FLAGS */
enum PROC_FLAGS enum PROC_FLAGS
{ {
PROC_BADINST=0x00000100,/* Proc contains invalid or 386 instruction */ PROC_BADINST=0x00000100, /* Proc contains invalid or 386 instruction */
PROC_IJMP =0x00000200,/* Proc incomplete due to indirect jmp */ PROC_IJMP =0x00000200, /* Proc incomplete due to indirect jmp */
PROC_ICALL =0x00000400, /* Proc incomplete due to indirect call */ PROC_ICALL =0x00000400, /* Proc incomplete due to indirect call */
PROC_HLL =0x00001000, /* Proc is likely to be from a HLL */ PROC_HLL =0x00001000, /* Proc is likely to be from a HLL */
PROC_NEAR =0x00010000, /* Proc exits with near return */ PROC_NEAR =0x00010000, /* Proc exits with near return */

View File

@ -83,7 +83,6 @@ eErrorId scan(uint32_t ip, ICODE &p); /* scanner.c */
void parse (CALL_GRAPH * *); /* parser.c */ void parse (CALL_GRAPH * *); /* parser.c */
extern int strSize (const uint8_t *, char); /* parser.c */ extern int strSize (const uint8_t *, char); /* parser.c */
//void disassem(int pass, Function * pProc); /* disassem.c */
void interactDis(const PtrFunction &, int initIC); /* disassem.c */ void interactDis(const PtrFunction &, int initIC); /* disassem.c */
bool JmpInst(llIcode opcode); /* idioms.c */ bool JmpInst(llIcode opcode); /* idioms.c */
queue::iterator appendQueue(queue &Q, BB *node); /* reducible.c */ queue::iterator appendQueue(queue &Q, BB *node); /* reducible.c */

View File

@ -9,9 +9,7 @@ class IStructuredTextTarget;
struct IDcc { struct IDcc {
static IDcc *get(); static IDcc *get();
virtual void BaseInit()=0;
virtual bool load(QString name)=0; // load and preprocess -> find entry point virtual bool load(QString name)=0; // load and preprocess -> find entry point
virtual const lFunction &validFunctions() const =0;
virtual QDir installDir()=0; virtual QDir installDir()=0;
virtual QDir dataDir(QString kind)=0; virtual QDir dataDir(QString kind)=0;
}; };

View File

@ -105,9 +105,9 @@ struct SYMTABLE
enum tableType /* The table types */ enum tableType /* The table types */
{ {
Label=0, /* The label table */ Label=0, /* The label table */
Comment /* The comment table */ Comment, /* The comment table */
NUM_TABLE_TYPES /* Number of entries: must be last */
}; };
constexpr int NUM_TABLE_TYPES = int(Comment)+1; /* Number of entries: must be last */
void createSymTables(void); void createSymTables(void);
void destroySymTables(void); void destroySymTables(void);

View File

@ -31,7 +31,7 @@ static struct MZHeader { /* EXE file header */
uint16_t lastPageSize; /* Size of the last page */ uint16_t lastPageSize; /* Size of the last page */
uint16_t numPages; /* Number of pages in the file */ uint16_t numPages; /* Number of pages in the file */
uint16_t numReloc; /* Number of relocation items */ uint16_t numReloc; /* Number of relocation items */
uint16_t numParaHeader; /* # of paragraphs in the header */ uint16_t numParaHeader; /* # of paragraphs in the header*/
uint16_t minAlloc; /* Minimum number of paragraphs */ uint16_t minAlloc; /* Minimum number of paragraphs */
uint16_t maxAlloc; /* Maximum number of paragraphs */ uint16_t maxAlloc; /* Maximum number of paragraphs */
uint16_t initSS; /* Segment displacement of stack */ uint16_t initSS; /* Segment displacement of stack */

View File

@ -876,14 +876,14 @@ void BB::findBBExps(LOCAL_ID &locals,Function *fnc)
bool res; bool res;
ID *_retVal; // function return value ID *_retVal; // function return value
Expr *_exp; // expression pointer - for HLI_POP and HLI_CALL */ Expr *_exp; // expression pointer - for HLI_POP and HLI_CALL
//Expr *lhs; // exp ptr for return value of a HLI_CALL */ //Expr *lhs; // exp ptr for return value of a HLI_CALL
iICODE ticode; // Target icode */ iICODE ticode; // Target icode
HLTYPE *ti_hl=nullptr; HLTYPE *ti_hl=nullptr;
uint8_t regi; uint8_t regi;
numHlIcodes = 0; numHlIcodes = 0;
assert(&fnc->localId==&locals); assert(&fnc->localId==&locals);
// register(s) to be forward substituted */ // register(s) to be forward substituted
auto valid_and_highlevel = instructions | filtered(ICODE::TypeAndValidFilter<HIGH_LEVEL>()); auto valid_and_highlevel = instructions | filtered(ICODE::TypeAndValidFilter<HIGH_LEVEL>());
for (auto picode = valid_and_highlevel.begin(); picode != valid_and_highlevel.end(); picode++) for (auto picode = valid_and_highlevel.begin(); picode != valid_and_highlevel.end(); picode++)
{ {

View File

@ -453,7 +453,8 @@ eReg otherLongRegi (eReg regi, int idx, LOCAL_ID *locTbl)
} }
/* Checks if the registers regL and regH have been used independently in /**
* Checks if the registers regL and regH have been used independently in
* the local identifier table. If so, macros for these registers are * the local identifier table. If so, macros for these registers are
* placed in the local identifier table, as these registers belong to a * placed in the local identifier table, as these registers belong to a
* long register identifier. */ * long register identifier. */

View File

@ -591,10 +591,9 @@ eErrorId scan(uint32_t ip, ICODE &p)
static bool relocItem(const uint8_t *p) static bool relocItem(const uint8_t *p)
{ {
PROG &prog(Project::get()->prog); PROG &prog(Project::get()->prog);
int i;
uint32_t off = p - prog.image(); uint32_t off = p - prog.image();
for (i = 0; i < prog.cReloc; i++) for (int i = 0; i < prog.cReloc; i++)
if (prog.relocTable[i] == off) if (prog.relocTable[i] == off)
return true; return true;
return false; return false;
@ -621,10 +620,10 @@ static int signex(uint8_t b)
return ((b & 0x80)? (int)(0xFFFFFF00 | s): (int)s); return ((b & 0x80)? (int)(0xFFFFFF00 | s): (int)s);
} }
/**************************************************************************** /**
* setAddress - Updates the source or destination field for the current * \brief Updates the source or destination field for the current
* icode, based on fdst and the TO_REG flag. * icode, based on fdst and the TO_REG flag.
* Note: fdst == true is for the r/m part of the field (dest, unless TO_REG) * \note fdst == true is for the r/m part of the field (dest, unless TO_REG)
* fdst == false is for reg part of the field * fdst == false is for reg part of the field
***************************************************************************/ ***************************************************************************/
static void setAddress(int i, bool fdst, uint16_t seg, int16_t reg, uint16_t off) static void setAddress(int i, bool fdst, uint16_t seg, int16_t reg, uint16_t off)

View File

@ -23,8 +23,6 @@ DccMainWindow::DccMainWindow(QWidget *parent) :
ui->statusbar->addPermanentWidget(new QLabel("Test")); ui->statusbar->addPermanentWidget(new QLabel("Test"));
g_IDCC = IDcc::get(); g_IDCC = IDcc::get();
g_IDCC->BaseInit();
g_IDCC->Init(this);
m_last_display = nullptr; m_last_display = nullptr;
m_command_queue = new CommandQueueView(this); m_command_queue = new CommandQueueView(this);
@ -78,7 +76,6 @@ void DccMainWindow::onNewFunction(PtrFunction f) {
void DccMainWindow::onOptim() void DccMainWindow::onOptim()
{ {
Project::get()->processCommands(); Project::get()->processCommands();
g_IDCC->analysis_Once();
emit functionListChanged(); emit functionListChanged();
if(m_last_display==m_selected_func) if(m_last_display==m_selected_func)
{ {
@ -87,8 +84,7 @@ void DccMainWindow::onOptim()
} }
void DccMainWindow::onOptim10() void DccMainWindow::onOptim10()
{ {
for(int i=0; i<10; i++) Project::get()->processCommands(10);
g_IDCC->analysis_Once();
emit functionListChanged(); emit functionListChanged();
if(m_last_display==m_selected_func) if(m_last_display==m_selected_func)
{ {