extern bool RepOp( name **pop, name *of, name *with ) /*******************************************************/ { name *op; name *base; name *index; bool change; op = *pop; change = false; if( op == of ) { *pop = with; change = true; } else if( op->n.class == N_INDEXED ) { base = op->i.base; if( HasTrueBase( op ) && base == of ) { base = with; change = true; } index = op->i.index; if( index == of ) { index = with; change = true; } if( change ) { *pop = ScaleIndex( index, base, op->i.constant, op->n.name_class, op->n.size, op->i.scale, op->i.index_flags ); } } return( change ); }
static byte DoDisp( name *op, hw_reg_set regs ) /*************************************************/ { name *base; int val; byte dmod; name *temp_base; val = op->i.constant; /* use integer value*/ base = op->i.base; if( !HasTrueBase( op ) ) { dmod = Displacement( val, regs ); } else if( base->n.class == N_TEMP ) { temp_base = DeAlias( base ); if( temp_base->t.location == NO_LOCATION ) { _Zoiks( ZOIKS_034 ); } val += NewBase( temp_base ) + base->v.offset - temp_base->v.offset; dmod = Displacement( val, regs ); } else {