Mail Archives: djgpp-workers/2000/05/23/13:00:27
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?
When I posted the bug report, I was using gcc 2.8.1, which generated
fine code with the source I had; it used only a single idiv
instruction. If the division and remainder statements were swapped, gcc
generated a lot of unnecessary register-register moves. Recently, I
tried compiling the same source with gcc 2.95.2, and was disappointed to
see that the extraneous data motion persisted for either statement
order, though still only a single idiv instruction was issued. I'll see
if I can write some assembly source this weekend -- next Monday's a
holiday in this country, so I should have some extra time.
-Eric Rudd
- Raw text -