A bug in the exchange was repaired.
Exchanges across pseudo-instructions didn't work properly.
This commit is contained in:
parent
da8966a6c8
commit
36af1e09be
1 changed files with 10 additions and 13 deletions
|
@ -339,7 +339,7 @@ int compact_line() {
|
||||||
lastglosym = curglosym;
|
lastglosym = curglosym;
|
||||||
setline() ; line_num++ ;
|
setline() ; line_num++ ;
|
||||||
if (table1() != sp_fpseu)
|
if (table1() != sp_fpseu)
|
||||||
fatal("no pseudo after global label");
|
fatal("no pseudo after data label");
|
||||||
case sp_fpseu:
|
case sp_fpseu:
|
||||||
inpseudo(tabval);
|
inpseudo(tabval);
|
||||||
setline() ;
|
setline() ;
|
||||||
|
@ -620,15 +620,13 @@ exchange(p1,p2) {
|
||||||
if ( ctrunc(a_lnp->instr_num) !=sp_fpseu ) {
|
if ( ctrunc(a_lnp->instr_num) !=sp_fpseu ) {
|
||||||
fatal("EXC inconsistency") ;
|
fatal("EXC inconsistency") ;
|
||||||
}
|
}
|
||||||
doinsert(a_lnp,line,a_lnp->ad.ad_ln.ln_extra-size) ;
|
doinsert(a_lnp,line,size-1) ;
|
||||||
a_lnp->ad.ad_ln.ln_first += size ;
|
a_lnp->ad.ad_ln.ln_extra -= size ;
|
||||||
a_lnp->ad.ad_ln.ln_extra = size-1 ;
|
|
||||||
size=0 ;
|
size=0 ;
|
||||||
b_lnp=a_lnp->l_next ;
|
|
||||||
} else {
|
} else {
|
||||||
doinsert(a_lnp,line,-1) ;
|
if( a_lnp) doinsert(a_lnp,line,-1) ;
|
||||||
b_lnp= a_lnp ;
|
|
||||||
}
|
}
|
||||||
|
b_lnp= a_lnp ;
|
||||||
while ( b_lnp ) {
|
while ( b_lnp ) {
|
||||||
b_lnp= b_lnp->l_next ;
|
b_lnp= b_lnp->l_next ;
|
||||||
line-- ;
|
line-- ;
|
||||||
|
@ -644,19 +642,18 @@ exchange(p1,p2) {
|
||||||
size++ ;
|
size++ ;
|
||||||
if ( size>=p2 ) break ;
|
if ( size>=p2 ) break ;
|
||||||
}
|
}
|
||||||
|
if ( !b_lnp ) { /* if a_lnp==0, so is b_lnp */
|
||||||
|
fatal("Cannot perform exchange") ;
|
||||||
|
}
|
||||||
if ( ( size-= p2 )>0 ) {
|
if ( ( size-= p2 )>0 ) {
|
||||||
if ( ctrunc(b_lnp->instr_num) !=sp_fpseu ) {
|
if ( ctrunc(b_lnp->instr_num) !=sp_fpseu ) {
|
||||||
fatal("EXC inconsistency") ;
|
fatal("EXC inconsistency") ;
|
||||||
}
|
}
|
||||||
doinsert(b_lnp,line,b_lnp->ad.ad_ln.ln_extra-size) ;
|
doinsert(b_lnp,line,size-1) ;
|
||||||
b_lnp->ad.ad_ln.ln_first += size ;
|
b_lnp->ad.ad_ln.ln_extra -= size ;
|
||||||
b_lnp->ad.ad_ln.ln_extra = size-1 ;
|
|
||||||
} else {
|
} else {
|
||||||
doinsert(b_lnp,line,-1) ;
|
doinsert(b_lnp,line,-1) ;
|
||||||
}
|
}
|
||||||
if ( !b_lnp ) { /* if a_lnp==0, so is b_lnp */
|
|
||||||
fatal("Cannot perform exchange") ;
|
|
||||||
}
|
|
||||||
t_lnp = b_lnp->l_next ;
|
t_lnp = b_lnp->l_next ;
|
||||||
b_lnp->l_next = pstate.s_fline ;
|
b_lnp->l_next = pstate.s_fline ;
|
||||||
pstate.s_fline= a_lnp->l_next ;
|
pstate.s_fline= a_lnp->l_next ;
|
||||||
|
|
Loading…
Reference in a new issue