From 902d2faadf37a5627ab2cbcd8993825c8749ec82 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 11 Jul 2002 15:33:02 +0000 Subject: applied Eric Anholt's patch for Athlon SSE --- src/mesa/x86/common_x86_asm.S | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/mesa/x86/common_x86_asm.S') diff --git a/src/mesa/x86/common_x86_asm.S b/src/mesa/x86/common_x86_asm.S index f877fd57c2..6fe7443c81 100644 --- a/src/mesa/x86/common_x86_asm.S +++ b/src/mesa/x86/common_x86_asm.S @@ -1,4 +1,4 @@ -/* $Id: common_x86_asm.S,v 1.10 2002/06/11 01:26:58 brianp Exp $ */ +/* $Id: common_x86_asm.S,v 1.11 2002/07/11 15:33:02 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -129,6 +129,15 @@ LLBL(cpuid_amd): * information after we verify that the extended functions are * supported. */ + /* The features we need are almost all in the extended set. The + * exception is SSE enable, which is in the standard set (0x1). + */ + MOV_L ( CONST(0x1), EAX ) + CPUID + TEST_L ( EAX, EAX ) + JZ ( LLBL (cpuid_failed) ) + MOV_L ( EDX, ESI ) + MOV_L ( CONST(0x80000000), EAX ) CPUID TEST_L ( EAX, EAX ) @@ -137,6 +146,10 @@ LLBL(cpuid_amd): MOV_L ( CONST(0x80000001), EAX ) CPUID MOV_L ( EDX, EAX ) + + AND_L ( CONST(0x02000000), ESI ) /* OR in the SSE bit */ + OR_L ( ESI, EAX ) + JMP ( LLBL (cpuid_done) ) LLBL(cpuid_other): -- cgit v1.2.3