programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

hardware float stack corruption

From: Osbourn, Gordon C <gcosbou_at_sandia.gov>
Date: Fri, 7 Oct 2005 11:06:40 -0600

Our small team of scientific Forth programmers has run into problems
associated with using the hardware float stack in SwiftForth 2.2.2.9.
We see a variety of symptoms, such as the same SwiftForth command giving
different answers or garbage answers in different executions. The
simplest version is to simply put a float value on the stack and hit
return, then executing f. produces garbage on one of our systems. We
find the root cause, by single-stepping through the assembly code, to be
that values in the hardware float registers are corrupted upon return
from certain SwiftForth system calls, e.g. a call to user32.dll by the
"ok" prompt code (that updates the status bar on the SwiftForth window)
.

SwiftForth's support_at_forth.com was not able to reproduce a symptom of
this problem that we described to them. However, this appears to be the
same problem reported by Bill McCarthy in sftalk in 2001. See
http://www.forth.com/archive/sftalk/2001/0416.html
http://www.forth.com/archive/sftalk/2001/0441.html
http://www.forth.com/archive/sftalk/2001/0442.html
http://www.forth.com/archive/sftalk/2001/0451.html

We agree with Bill's last message that this is likely a
SwiftForth-specific hardware stack problem (associated with making these
system calls), as other Forths and C programs do leave values on the
float hardware stack during their Window's system calls and these
registers are restored properly afterwards.

Has a solution to this problem been found?

Gordon Osbourn

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Oct 07 2005 - 10:07:40 PDT

This archive was generated by hypermail 2.2.0 : Thu Dec 04 2008 - 03:04:20 PST