Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 18 Oct 2000 23:20:36 -0400 From: Christopher Faylor To: cygwin AT sources DOT redhat DOT com Subject: Re: cygwin on a 386? Message-ID: <20001018232036.B15926@cygnus.com> Reply-To: cygwin AT sources DOT redhat DOT com Mail-Followup-To: cygwin AT sources DOT redhat DOT com References: <035d01c03976$730e6020$3c5350d8 AT guinness> <20001018212921 DOT A9690 AT cygnus DOT com> <4 DOT 3 DOT 2 DOT 7 DOT 0 DOT 20001018211721 DOT 00b78990 AT pop DOT bresnanlink DOT net> <20001018223351 DOT A10333 AT cygnus DOT com> <035d01c03976$730e6020$3c5350d8 AT guinness> <20001018224518 DOT B10333 AT cygnus DOT com> <4 DOT 3 DOT 2 DOT 7 DOT 0 DOT 20001018214927 DOT 00c8bb50 AT pop DOT bresnanlink DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.6i In-Reply-To: <4.3.2.7.0.20001018214927.00c8bb50@pop.bresnanlink.net>; from cabbey@chartermi.net on Wed, Oct 18, 2000 at 09:52:54PM -0500 On Wed, Oct 18, 2000 at 09:52:54PM -0500, Chris Abbey wrote: >At 22:45 10/18/00 -0400, Christopher Faylor wrote: >Now that I've had a minute to think about this though, let me ask you >a better question.... WHY? What could you possibly want to put into >cygwin that you feel it HAS to be done in asm? And that you can write >better asm for this than gcc? There are all sorts of places where you can get a speed advantage by going straight to asm. Or, there are simply some things you cannot do in C when you are attempting to emulate an OS. In this particular case, I'd like to avoid the overhead of a function call when doing a relatively frequent operation (InterlockedIncrement and InterlockedExchange). These are basically one instruction but the function call overhead makes this much higher -- especially on Windows 95. Windows 95 uses an unbelievable number of instructions to do these relatively simple operations, thanks to the fact that it runs on more than just Pentiums. InterlockedExchange uses an opcode that is available on 80486 and above (I believe) but is unavailable on 80386 and below. There are also place in Cygwin where it's necessary to read the frame when adjusting things after a fork. You can't do that with C. We use asm for signal handling, auto loading of DLLs, for setting up exception handlers, and for experimental vfork emulation. cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com