delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/05/23/07:07:56

Message-Id: <200005231106.HAA32744@delorie.com>
From: "Dieter Buerssner" <buers AT gmx DOT de>
To: djgpp-workers AT delorie DOT com
Date: Tue, 23 May 2000 13:13:19 +0200
MIME-Version: 1.0
Subject: Re: Bug 314
References: <392937F4 DOT B78491A5 AT cyberoptics DOT com>
In-reply-to: <Pine.SUN.3.91.1000523120632.4345D@is>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019