Moved most of register definitions to use eReg enum
This commit is contained in:
@@ -123,8 +123,14 @@ bool Idiom1::match(iICODE picode)
|
||||
}
|
||||
int Idiom1::action()
|
||||
{
|
||||
#ifdef _lint
|
||||
for (auto ik=m_icodes.begin(); ik!=m_icodes.end(); ++ik)
|
||||
{
|
||||
iICODE ic(*ik);
|
||||
#else
|
||||
for(iICODE ic : m_icodes)
|
||||
{
|
||||
#endif
|
||||
ic->invalidate();
|
||||
}
|
||||
m_func->flg |= PROC_HLL;
|
||||
|
||||
@@ -76,8 +76,8 @@ bool Idiom13::match(iICODE pIcode)
|
||||
return false;
|
||||
m_icodes[0]=pIcode++;
|
||||
m_icodes[1]=pIcode++;
|
||||
m_loaded_reg = 0;
|
||||
uint8_t regi;
|
||||
m_loaded_reg = rUNDEF;
|
||||
eReg regi;
|
||||
|
||||
/* Check for regL */
|
||||
regi = m_icodes[0]->ll()->dst.regi;
|
||||
@@ -88,7 +88,7 @@ bool Idiom13::match(iICODE pIcode)
|
||||
{
|
||||
if (m_icodes[1]->ll()->dst.regi == (regi + 4)) //TODO: based on distance between AH-AL,BH-BL etc.
|
||||
{
|
||||
m_loaded_reg=(regi - rAL + rAX);
|
||||
m_loaded_reg=(eReg)(regi - rAL + rAX);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ int Idiom8::action()
|
||||
{
|
||||
int idx;
|
||||
COND_EXPR *rhs,*lhs,*expr;
|
||||
uint8_t regH,regL;
|
||||
eReg regH,regL;
|
||||
regH=m_icodes[0]->ll()->dst.regi;
|
||||
regL=m_icodes[1]->ll()->dst.regi;
|
||||
idx = m_func->localId.newLongReg (TYPE_LONG_SIGN, regH, regL, m_icodes[0]);
|
||||
@@ -119,7 +119,7 @@ int Idiom12::action()
|
||||
{
|
||||
int idx;
|
||||
COND_EXPR *rhs,*lhs,*expr;
|
||||
uint8_t regH,regL;
|
||||
eReg regH,regL;
|
||||
regL=m_icodes[0]->ll()->dst.regi;
|
||||
regH=m_icodes[1]->ll()->dst.regi;
|
||||
|
||||
@@ -158,7 +158,7 @@ int Idiom9::action()
|
||||
{
|
||||
int idx;
|
||||
COND_EXPR *rhs,*lhs,*expr;
|
||||
uint8_t regH,regL;
|
||||
eReg regH,regL;
|
||||
regL=m_icodes[1]->ll()->dst.regi;
|
||||
regH=m_icodes[0]->ll()->dst.regi;
|
||||
idx = m_func->localId.newLongReg (TYPE_LONG_UNSIGN,regH,regL,m_icodes[0]);
|
||||
|
||||
Reference in New Issue
Block a user