Newsgroups: comp.os.msdos.djgpp From: Elliott Oti Subject: Re: -O3 and -O2 breaks my NASM code Sender: usenet AT phys DOT uu DOT nl (News system Tijgertje) Message-ID: In-Reply-To: <6ttip0$ng8$1@news2.saix.net> Date: Fri, 18 Sep 1998 13:27:17 GMT Content-Type: TEXT/PLAIN; charset=US-ASCII References: <6ttip0$ng8$1 AT news2 DOT saix DOT net> Mime-Version: 1.0 Organization: Physics and Astronomy, University of Utrecht, The Netherlands Lines: 23 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Fri, 18 Sep 1998, Rylan wrote: > Hi, > > I've ran into a situation where attempting to use -O3 and even -O2 with ANY > code that calls NASM compiled functions (in their own, seperate .O) compiles > fine but crashes the moment the NASM code is reached. This happens without a > stack trace, nothing - the whole program just stops. Unoptimized compiles of > the same code runs 100%. > > Any ideas why, and how I can get NASM code to coexist with optimised DJGPP > code? Do you save all registers before calling the NASM functions? Does it still crash even if you pop all registers? Elliott Oti http://www.fys.ruu.nl/~oti "Q: What did the elephant say to the naked man? A: It's cute but can you pick up peanuts with it?"