delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/05/23/13:00:27

Date: Tue, 23 May 2000 08:58:08 -0500
From: Eric Rudd <rudd AT cyberoptics DOT com>
Subject: Re: Bug 314
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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)
X-Accept-Language: en
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000523120632 DOT 4345D AT is>
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

- Raw text -


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