Strange crash
Rein Klazes
rklazes at xs4all.nl
Wed Apr 18 02:08:25 CDT 2001
On Wed, 18 Apr 2001 11:54:37 +0800, you wrote:
> I have attached full assembly listing of graphics/x11drv/pen.c produced by gcc.
> I removed -g option to reduce the output size and added -S -fverbose-asm.
Same as the dissassembly that I see here:
| fnstcw -2(%edx)
Store the CW in a temporary variable.
|#NO_APP
| movzwl -2(%edx),%eax
| andb $243,%ah
| orb $4,%ah
This manipulates bits 10 and 11, that control the rounding behaviour.
| movw %ax,-4(%edx)
|#APP
| fldcw -4(%edx)
Load the CW with adjusted bits 10 and 11.
| frndint
Rounding the float value to int, which likely causes a lost precision
exception. Because it does not, the PE mask must be set.
| fldcw -2(%edx)
Load original CW. Now the exception happens, which indicates the PE
maskbit is cleared. I don't see how that can be. (you should check
that the disassembly in winedbg is the same as this code)
Moreover I cannot reproduce your failure (using gcc 2.95.4 and gnu as
2.11.90.0.1) If I set the variables to 0 and 0.0, no exception
follows.
Rein.
--
Rein Klazes
rklazes at xs4all.nl
More information about the wine-devel
mailing list