delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/23/07:15:29

Date: Wed, 23 Sep 1998 14:15:28 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Doug Gale <dgale AT mailexcite DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Optimizations
In-Reply-To: <3604F82B.68D16BCF@mailexcite.com>
Message-ID: <Pine.SUN.3.91.980923141458.1392O-100000@is>
MIME-Version: 1.0

On Sun, 20 Sep 1998, Doug Gale wrote:

> the compiler generates this (strange) code:
> 
> movl $0,nFront
> movl nFront,%ebx
> movl %ebx,nBack
> movl %ebx,nOnPlane
> 
> Why read a constant from memory after storing it? I expected something like
> this:
> 
> xorl %ebx,%ebx
> movl %ebx,nFront
> movl %ebx,nBack
> movl %ebx,nOnPlane

IMHO, you should talk to GCC developers to understand whether this is
a bug or a feature.

- Raw text -


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