Message-Id: <200005231106.HAA32744@delorie.com> From: "Dieter Buerssner" To: djgpp-workers AT delorie DOT com Date: Tue, 23 May 2000 13:13:19 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Bug 314 References: <392937F4 DOT B78491A5 AT cyberoptics DOT com> In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12b) Reply-To: djgpp-workers AT delorie DOT com 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