Closed alexalkis closed 2 years ago
sorry, I pass on this.
-mshort
thanks!
A general question here: why does the compiler not make use of divs.w here and instead chooses to extend both operands for divs.l? This happens also when providing -m68020 and higher. Edit: I was testing without -mshort. Is the divs.w variant slower? Edit2: divs.l is slower than divs.w
I guess that there is some forced int
conversion. Thus divs.w does not match unless -mshort
is used. And since int
can represent unsigned char
or unsigned short
it ends up with int
which is signed and thus uses divs
http://franke.ms/cex/z/ss9Trx
Can't get the compiler to emit div.s no mater what I tried. I even change type to char.
On sas/c it gives:
or to put it another way, is there a senario where compiler emits div.s in 68000 mode?