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.
front
cinap_lenrek 2013-04-29 20:15:40 +02:00
parent b325475fc8
commit ce62bbb853
1 changed files with 9 additions and 0 deletions

View File

@ -1354,6 +1354,15 @@ joinsplit(Reg *r, Joininfo *j)
j->end = r->s2;
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)) {
j->end = r->s1;
return Setcond;