home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / tools / 713 < prev    next >
Encoding:
Text File  |  1992-08-15  |  2.2 KB  |  55 lines

  1. Newsgroups: comp.os.ms-windows.programmer,comp.os.ms-windows.programmer.tools
  2. Path: sparky!uunet!uunet.ca!hyper.hyper.com!bonneau
  3. From: bonneau@hyper.com (Paul Bonneau,,)
  4. Subject: Followup to MSC 7.0 floating point woes
  5. Message-ID: <1992Aug15.222656.18788@hyper.hyper.com>
  6. Sender: bonneau@hyper.hyper.com (Paul Bonneau)
  7. Organization: HyperCube Inc.
  8. Date: Sat, 15 Aug 1992 22:26:56 GMT
  9. Lines: 44
  10.  
  11. Hi everybody,
  12.  
  13. A couple of weeks or so ago I posted a pair of articles
  14. concerning problems I have encountered with version 7 of the
  15. Microsoft C compiler.  Since then, several people (you know
  16. who you are 8-)) have asked to be kept advised.   Hence the
  17. post.
  18.  
  19. It turns out there was some confusion between the two groups
  20. of Microsoft people I was speaking to, the compiler group and
  21. some folks from the Windows team.  Here are the facts:
  22.  
  23. 1) The new version of win87em.dll, to be released by
  24.    Microsoft (the new version will placed on CompuServe) does
  25.    *not* require INT 3D's in your code to function correctly.
  26.    If a floating point exception (interrupt 16) occurs,
  27.    win87em.dll handles it by:
  28.  
  29.    a) storing the code at the CS:IP that caused the
  30.       exception,
  31.    b) overwriting the code with an INT 3D,
  32.    c) returning control to your app,
  33.    d) your app will now immediately execute the INT 3D, which
  34.       is also handled by win87em.dll,
  35.    e) win87em.dll restores the saved code and takes the
  36.       appropriate action for the exception.
  37.  
  38. 2) C7.0 *does* have a bug in the "fast mode compiler".  The
  39.    fast mode compiler is used when you specify -Od (no
  40.    optimizations), which is what most folks do for debug
  41.    code.  It can also be explicitly invoked with the -f
  42.    switch.  The fast mode compiler treats -FPi87 the same as
  43.    -FPi, i.e. you get a bunch of INT 3D's after the code
  44.    segment has been loaded.  If you want to continue to use
  45.    -Od, you can explicitly turn off the fast mode compiler
  46.    with the apparently undocumented -f- switch.
  47.  
  48. One more point to mention is that after the loader patches
  49. -FPi code with a bunch of INT 3D's, the new win87em.dll will
  50. unpatch them the first time they are executed.  So even code
  51. that does not presume a floating point processor can achieve
  52. speed very close to code that does, when a FPU is present.
  53.  
  54. cheers - Paul.
  55.