lots of small things
This commit is contained in:
@@ -95,7 +95,7 @@ bool Idiom18::match(iICODE picode)
|
||||
|
||||
m_is_dec = m_icodes[1]->ic.ll.match(iDEC);
|
||||
int type = -1; /* type of variable: 1 = reg-var, 2 = local */
|
||||
byte regi; /* register of the MOV */
|
||||
uint8_t regi; /* register of the MOV */
|
||||
|
||||
/* Get variable */
|
||||
if (m_icodes[1]->ic.ll.dst.regi == 0) /* global variable */
|
||||
@@ -238,7 +238,7 @@ int Idiom19::action()
|
||||
bool Idiom20::match(iICODE picode)
|
||||
{
|
||||
uint8_t type = 0; /* type of variable: 1 = reg-var, 2 = local */
|
||||
byte regi; /* register of the MOV */
|
||||
uint8_t regi; /* register of the MOV */
|
||||
if(std::distance(picode,m_end)<4)
|
||||
return false;
|
||||
for(int i=0; i<4; ++i)
|
||||
|
||||
@@ -38,7 +38,7 @@ int Idiom3::action()
|
||||
{
|
||||
if (m_icodes[0]->ic.ll.flg & I)
|
||||
{
|
||||
m_icodes[0]->ic.ll.src.proc.proc->cbParam = (int16)m_param_count;
|
||||
m_icodes[0]->ic.ll.src.proc.proc->cbParam = (int16_t)m_param_count;
|
||||
m_icodes[0]->ic.ll.src.proc.cb = m_param_count;
|
||||
m_icodes[0]->ic.ll.src.proc.proc->flg |= CALL_C;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ bool Idiom17::match(iICODE picode)
|
||||
/* Match ADD SP, immed */
|
||||
for(int i=0; i<2; ++i)
|
||||
m_icodes.push_back(picode++);
|
||||
byte regi;
|
||||
uint8_t regi;
|
||||
|
||||
/* Match POP reg */
|
||||
if (m_icodes[1]->ic.ll.match(iPOP))
|
||||
@@ -98,7 +98,7 @@ int Idiom17::action()
|
||||
{
|
||||
if (m_icodes[0]->isLlFlag(I))
|
||||
{
|
||||
m_icodes[0]->ic.ll.src.proc.proc->cbParam = (int16)m_param_count;
|
||||
m_icodes[0]->ic.ll.src.proc.proc->cbParam = (int16_t)m_param_count;
|
||||
m_icodes[0]->ic.ll.src.proc.cb = m_param_count;
|
||||
m_icodes[0]->ic.ll.src.proc.proc->flg |= CALL_C;
|
||||
for(int idx=1; idx<m_icodes.size(); ++idx)
|
||||
|
||||
@@ -131,7 +131,7 @@ bool Idiom4::match(iICODE pIcode)
|
||||
/* Check for RET(F) immed */
|
||||
if (pIcode->ic.ll.flg & I)
|
||||
{
|
||||
m_param_count = (int16)pIcode->ic.ll.src.op();
|
||||
m_param_count = (int16_t)pIcode->ic.ll.src.op();
|
||||
}
|
||||
}
|
||||
int Idiom4::action()
|
||||
@@ -140,7 +140,7 @@ int Idiom4::action()
|
||||
m_icodes[idx]->invalidate();
|
||||
if(m_param_count)
|
||||
{
|
||||
m_func->cbParam = (int16)m_param_count;
|
||||
m_func->cbParam = (int16_t)m_param_count;
|
||||
m_func->flg |= CALL_PASCAL;
|
||||
}
|
||||
return 1;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* [PUSH SI]
|
||||
* In which case, the stack variable flags are set
|
||||
****************************************************************************/
|
||||
Int Idiom1::checkStkVars (iICODE pIcode)
|
||||
int Idiom1::checkStkVars (iICODE pIcode)
|
||||
{
|
||||
/* Look for PUSH SI */
|
||||
int si_matched=0;
|
||||
@@ -51,12 +51,12 @@ Int Idiom1::checkStkVars (iICODE pIcode)
|
||||
bool Idiom1::match(iICODE picode)
|
||||
{
|
||||
uint8_t type = 0; /* type of variable: 1 = reg-var, 2 = local */
|
||||
byte regi; /* register of the MOV */
|
||||
uint8_t regi; /* register of the MOV */
|
||||
if(m_func->flg & PROC_HLL)
|
||||
return false;
|
||||
if(picode==m_end)
|
||||
return false;
|
||||
Int n;
|
||||
int n;
|
||||
m_icodes.clear();
|
||||
m_min_off = 0;
|
||||
/* PUSH BP as first instruction of procedure */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
using namespace std;
|
||||
|
||||
/*****************************************************************************
|
||||
* idiom 14 - Long word assign
|
||||
* idiom 14 - Long uint16_t assign
|
||||
* MOV regL, mem/reg
|
||||
* XOR regH, regH
|
||||
* Eg: MOV ax, di
|
||||
@@ -61,14 +61,14 @@ int Idiom14::action()
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* idiom 13 - Word assign
|
||||
* idiom 13 - uint16_t assign
|
||||
* MOV regL, mem
|
||||
* MOV regH, 0
|
||||
* Eg: MOV al, [bp-2]
|
||||
* MOV ah, 0
|
||||
* => MOV ax, [bp-2]
|
||||
* Found in Borland Turbo C, used for multiplication and division of
|
||||
* byte operands (ie. they need to be extended to words).
|
||||
* uint8_t operands (ie. they need to be extended to words).
|
||||
****************************************************************************/
|
||||
bool Idiom13::match(iICODE pIcode)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ bool Idiom13::match(iICODE pIcode)
|
||||
m_icodes[0]=pIcode++;
|
||||
m_icodes[1]=pIcode++;
|
||||
m_loaded_reg = 0;
|
||||
byte regi;
|
||||
uint8_t regi;
|
||||
|
||||
/* Check for regL */
|
||||
regi = m_icodes[0]->ic.ll.dst.regi;
|
||||
@@ -101,7 +101,7 @@ int Idiom13::action()
|
||||
COND_EXPR *lhs,*rhs;
|
||||
lhs = COND_EXPR::idReg (m_loaded_reg, 0, &m_func->localId);
|
||||
m_icodes[0]->setRegDU( m_loaded_reg, eDEF);
|
||||
m_icodes[0]->du1.numRegsDef--; /* prev byte reg def */
|
||||
m_icodes[0]->du1.numRegsDef--; /* prev uint8_t reg def */
|
||||
rhs = COND_EXPR::id (*m_icodes[0], SRC, m_func, m_icodes[0], *m_icodes[0], NONE);
|
||||
m_icodes[0]->setAsgn(lhs, rhs);
|
||||
m_icodes[1]->invalidate();
|
||||
|
||||
@@ -79,7 +79,7 @@ bool Idiom16::match (iICODE picode)
|
||||
for(int i=0; i<3; ++i)
|
||||
m_icodes[i]=picode++;
|
||||
|
||||
byte regi = m_icodes[0]->ic.ll.dst.regi;
|
||||
uint8_t regi = m_icodes[0]->ic.ll.dst.regi;
|
||||
if ((regi >= rAX) && (regi < INDEXBASE))
|
||||
{
|
||||
if (m_icodes[1]->ic.ll.match(iSBB) && m_icodes[2]->ic.ll.match(iINC))
|
||||
|
||||
@@ -30,7 +30,7 @@ int Idiom8::action()
|
||||
{
|
||||
int idx;
|
||||
COND_EXPR *rhs,*lhs,*expr;
|
||||
byte regH,regL;
|
||||
uint8_t regH,regL;
|
||||
regH=m_icodes[0]->ic.ll.dst.regi;
|
||||
regL=m_icodes[1]->ic.ll.dst.regi;
|
||||
idx = m_func->localId.newLongReg (TYPE_LONG_SIGN, regH, regL, m_icodes[0]);
|
||||
@@ -58,8 +58,8 @@ int Idiom8::action()
|
||||
****************************************************************************/
|
||||
bool Idiom15::match(iICODE pIcode)
|
||||
{
|
||||
Int n = 1;
|
||||
byte regi;
|
||||
int n = 1;
|
||||
uint8_t regi;
|
||||
|
||||
if(distance(pIcode,m_end)<2)
|
||||
return false;
|
||||
@@ -122,7 +122,7 @@ int Idiom12::action()
|
||||
{
|
||||
int idx;
|
||||
COND_EXPR *rhs,*lhs,*expr;
|
||||
byte regH,regL;
|
||||
uint8_t regH,regL;
|
||||
regL=m_icodes[0]->ic.ll.dst.regi;
|
||||
regH=m_icodes[1]->ic.ll.dst.regi;
|
||||
|
||||
@@ -162,7 +162,7 @@ int Idiom9::action()
|
||||
{
|
||||
int idx;
|
||||
COND_EXPR *rhs,*lhs,*expr;
|
||||
byte regH,regL;
|
||||
uint8_t regH,regL;
|
||||
regL=m_icodes[1]->ic.ll.dst.regi;
|
||||
regH=m_icodes[0]->ic.ll.dst.regi;
|
||||
idx = m_func->localId.newLongReg (TYPE_LONG_UNSIGN,regH,regL,m_icodes[0]);
|
||||
|
||||
Reference in New Issue
Block a user