From: snarfy AT goodnet DOT com Newsgroups: comp.os.msdos.djgpp Subject: FPU instructions & -lemu Date: 13 Jan 1997 14:10:24 GMT Organization: GoodNet Lines: 44 Message-ID: <5bdfog$nme@news.goodnet.com> NNTP-Posting-Host: goodnet.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Is there a list anywhere of FPU instructions, specifically 387+ instructions? Specifically, I need help with the fwait, fsave, and frstor instructions. Do they work with the emulator? How large of a buffer do you need for fsave/frstor? I have some code that uses these instructions but it bombs out if I turn on any kind of optimizations. The catch is that the optimizations are in a different source file! I think my struct is getting optimized when I don't want it to. Here's a sample: file lwp.c typedef struct lwp_struct { int pid; int *stack; ... volatile char fpu[112]; } lwp; file lwpasm.S ... fwait fsave (%esi) /* pointer to a lwp's fpu[112] member */ fwait ... fwait frstor (%esi) /* pointer to a lwp's fpu[112] member */ fwait This code works without optimizations, but doesn't if I compile lwp.c with -O. It does work with optimizations on if I take out the fsave/frstor instructions. On a side note, does the optimizer touch .S files? Thanks Josh snarfy AT goodnet DOT com