delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/08/21/10:04:49

Date: Fri, 21 Aug 92 09:06:25 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: rivat AT matups DOT matups DOT fr
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: speed questions and other questions

>1/ when I run my own chess program with debug32, it is
>about 15% faster as with go32.
>This is very surprising!
>do you know how this can happen?
>has go32 some options for maximal speed?

The paging algorithm in go32 has a predictive pre-pager that debug32
doesn't have (debug32 needs the data space for other stuff).  That's
the only difference besides the topline info.

>2/ do you know how to make inline functions:
>bit_scan_forward and bit_scan_reverse using the assembly
>instructions of the 386/486.
>(the problem is to make them inline...)

Something like this:

static inline int bit_scan_forward(int x)
{
  register int rv;
  asm("bsf %0,%1" : "=g" (rv) : "g" (x) );
  return rv;
}

I'm guessing at the bsf and constraint syntax, but I've used this
method before and it expands into a single opcode with -O.

>1/ Does djgpp support os2 version 2?

No.  It is feasible to add DPMI 1.0 support to go32, and I have the
DPMI spec, but do not have the time nor the software (OS/2) to develop
or test it.

>2/ Will djgpp be supported under Windows?

Only if DPMI 1.0 is truly supported by Windows, subject to caveats above.

>(I have heard that Microsoft C 7.00 is a 32 bits application
>that runs under Windows)

Then just compile gcc with MSC and be done with it.  This is one of
the reasons why I don't bother with OS/2 - because you can already
build a native 32-bit gcc given the existing development environment.
Notice that go32 doesn't run under Unix either.

DJ
dj AT ctron DOT com
Life is a banana.

- Raw text -


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