5c: dont emit conditional integer division instructions

the integer division instructions are emulated with _div()
function patched in by 5l which does not handle conditional
execution. so do not optimize away the branch in that case.
This commit is contained in:
cinap_lenrek 2013-04-29 20:15:40 +02:00
parent b325475fc8
commit ce62bbb853

View file

@ -1354,6 +1354,15 @@ joinsplit(Reg *r, Joininfo *j)
j->end = r->s2; j->end = r->s2;
return Branch; return Branch;
} }
switch(r->prog->as){
case ADIV:
case ADIVU:
case AMOD:
case AMODU:
/* emulated by 5l, doesnt handle conditionals */
j->end = r->s1;
return Toolong;
}
if (modifiescpsr(r->prog)) { if (modifiescpsr(r->prog)) {
j->end = r->s1; j->end = r->s1;
return Setcond; return Setcond;