delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/11/10:29:02

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: Martin Stromberg <Martin DOT Stromberg AT epl DOT ericsson DOT se>
Message-Id: <200201111528.QAA12733@lws256.lu.erisoft.se>
Subject: Re: Proposed lstat.c patch for Win2000/XP device bit fix
To: djgpp-workers AT delorie DOT com
Date: Fri, 11 Jan 2002 16:28:54 +0100 (MET)
In-Reply-To: <10201102223.AA16574@clio.rice.edu> from "Charles Sandmann" at Jan 10, 2002 04:23:34 PM
X-Mailer: ELM [version 2.5 PL3]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 
> > > Isn't this code always included in the image. IIRC, the recommendation
> > > is to use ff_blk.lfn_magic[0] == 'F' && ff_blk.lfn_magic[0] == 'A' &&
> > > ... if so.
> > 
> > Why is this recommended? (I had a look through the thread, but I couldn't
> > see the answer.) Surely the program size overhead of strcmp() vs. explicit
> > comparison can't be that great.
> 
> Facts:
>  1) -O2 -s shows that strcmp is inlined here.  The LFN32 takes 6 bytes of
>     space, the code take 23 bytes for the inlined rep cmpsb for a total of
>     29 bytes in 7 instructions.
>  2) -O2 -s shows the replacement code takes 22 bytes (a savings of 7 bytes
>     per instance) in 4 instructions.
> 
> I just don't think the grand total of 28 bytes in the 4 places are worth
> the code changes.  I think we should just use the strcmp and forget it.
> (Remember, the original idea here was to fix stat for devices on W2K ...).

Ok. I'm proved to be wrong. Plus I just found the mail about this. I
misremembered. The complaint was about sscanf not strcmp. Sorry guys
(and gals if there are any about)!


Right,

						MartinS

- Raw text -


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