Mail Archives: djgpp-workers/2000/05/23/07:07:56
On 23 May 00, at 12:06, Eli Zaretskii wrote:
> The code seems consistent with C9X draft, as far as I could see, but
> isn't it better to replace it with inline asm that does this in a
> single instruction?
Gcc will usually produce only one idiv instruction for n/d; n%d pairs
for integer types smaller long long. It does in this case, when
compiled with -O or -O2. There seems to be some redundant movs,
but it probably is not worth the trouble to avoid those. (Eric
switched the two expressions, which produces slightly better code.)
Regards,
Dieter
- Raw text -