* [gentoo-dev] arithmetic exception in XFree with sse instructions
@ 2003-08-29 0:04 Frederick Grim
0 siblings, 0 replies; only message in thread
From: Frederick Grim @ 2003-08-29 0:04 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 484 bytes --]
Howdy,
There is a problem in the mesa code in xfree that popped up when I was using some
mesh generating software. This fix was commited by Linus to mesalib but hasn't made it
into xfree. Since the problem arose for me I suppose some else has caught it as well.
Hence the patch.
Fred
--
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo
16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
[-- Attachment #1.2: xfree-sse.patch --]
[-- Type: text/plain, Size: 1357 bytes --]
diff -urN xc/extras/Mesa/src/X86/common_x86_asm.S xc.new/extras/Mesa/src/X86/common_x86_asm.S
--- xc/extras/Mesa/src/X86/common_x86_asm.S 2002-12-16 11:18:33.000000000 -0500
+++ xc.new/extras/Mesa/src/X86/common_x86_asm.S 2003-08-28 15:12:28.000000000 -0400
@@ -64,11 +64,6 @@
GLNAME( found_intel ): STRING( "Genuine Intel processor found\n\0" )
GLNAME( found_amd ): STRING( "Authentic AMD processor found\n\0" )
-#ifdef USE_SSE_ASM
-GLNAME( sse_test_dummy ):
- D_LONG 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000
-#endif
-
SEG_TEXT
@@ -118,10 +113,10 @@
CPUID
MOV_L ( EDX, EAX )
- /* Mask out highest bit, which is used by AMD for 3dnow.
- * Newer Intel have this bit set, but do not support 3dnow.
- */
- AND_L ( CONST(0X7FFFFFFF), EAX)
+ /* Mask out highest bit, which is used by AMD for 3dnow
+ * Newer Intel have this bit set, but do not support 3dnow
+ */
+ AND_L ( CONST(0X7FFFFFFF), EAX)
JMP ( LLBL(cpuid_done) )
LLBL(cpuid_amd):
@@ -222,7 +217,13 @@
LDMXCSR ( REGOFF( -8, EBP ) )
XORPS ( XMM0, XMM0 )
- MOVUPS ( CONTENT( GLNAME( sse_test_dummy ) ), XMM1 )
+
+ PUSH_L ( CONST( 0x3f800000 ) )
+ PUSH_L ( CONST( 0x3f800000 ) )
+ PUSH_L ( CONST( 0x3f800000 ) )
+ PUSH_L ( CONST( 0x3f800000 ) )
+
+ MOVUPS ( REGIND( ESP ), XMM1 )
DIVPS ( XMM0, XMM1 )
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-29 0:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-29 0:04 [gentoo-dev] arithmetic exception in XFree with sse instructions Frederick Grim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox