Date: Tue, 23 May 2000 08:58:08 -0500 From: Eric Rudd Subject: Re: Bug 314 To: Eli Zaretskii Cc: djgpp-workers AT delorie DOT com Message-id: <392A8E70.F0744957@cyberoptics.com> Organization: CyberOptics MIME-version: 1.0 X-Mailer: Mozilla 4.72 [en] (Win95; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en References: Reply-To: djgpp-workers AT delorie DOT com 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