Strange crash

Rein Klazes rklazes at
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.

|	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)
|	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 If I set the variables to 0 and 0.0, no exception

Rein Klazes
rklazes at

More information about the wine-devel mailing list