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:
parent
b325475fc8
commit
ce62bbb853
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue