Commit Graph

22 Commits

Author SHA1 Message Date
Brian Paul 1e105741f1 util: simplify bit shifting in util_cpu_detect() 2011-04-07 13:41:52 -06:00
Vinson Lee 3bdbccef2a util: Use #ifdef instead of #if.
This is a typo fix of earlier commit 0f3b3751b8.
2010-08-21 23:36:30 -07:00
Vinson Lee 0f3b3751b8 util: Define dump_cpu only for DEBUG builds.
dump_cpu is used only when DEBUG is defined.

Fixes the following GCC warning on builds without DEBUG defined.
util/u_cpu_detect.c:76: warning: 'debug_get_option_dump_cpu' defined but not used
2010-08-21 23:28:52 -07:00
José Fonseca 7a40d15e6c util: Remove the x86 exception handlers.
Unused now that check_os_katmai_support was removed.
2010-08-21 10:07:12 +01:00
Vinson Lee 15a3b42e13 util: Remove check_os_katmai_support.
check_os_katmai_support checks that the operating system running on a
SSE-capable processor supports SSE. This is necessary for unpatched
2.2.x and earlier kernels. 2.4.x and later kernels support SSE.

check_os_katmai_support will disable SSE capabilities for 32-bit x86
operating systems for which there is no code path. Currently, this
function handles Linux, Windows, and several BSDs. Mac OS, Cygwin, and
Solaris are several operating systems with no code paths.

Rather than add code for the unhandled operating systems, remove this
function altogether. This will fix SSE detection on all recent 32-bit
x86 operating systems. This completely breaks functionality on unpatched
2.2.x and earlier kernels, although there are likely no Gallium3D users
on such operating systems.
2010-08-16 18:52:37 -07:00
Jakob Bornecrantz 7f5202be63 gallium: Make printing info on debug builds default off
This commit silences the printing off most of the debug information
when running debug builds. The big culprits are: the tgsi sanity checker
that gets run on all shaders on debug; all the options; and
finaly the cpu caps printer.
2010-08-15 01:03:23 +01:00
Luca Barbieri 9232566269 u_cpu_detect: remove arch and little_endian
This logic duplicates the one in p_config.h, so remove it and adjust
the only two places that were using it.
2010-08-14 19:23:52 +02:00
Brian Paul 14e9fbee1c gallium: remove stray semicolons 2010-08-06 15:09:41 -06:00
Jakob Bornecrantz 4d65055b1f util: Add option to not dump cpu caps 2010-08-05 17:25:13 -07:00
Brian Paul b17ee335e3 util: fix unused function warning on non-x86 2010-07-26 20:48:29 -06:00
nobled 3cef6c42bc util: fix CPU detection on OS X
s/PIPE_OS_DARWIN/PIPE_OS_APPLE, since there is no PIPE_OS_DARWIN.

Acked-by: Vinson Lee <vlee@vmware.com>
2010-07-26 12:27:01 -07:00
Brian Paul c4c11eb456 gallium/util: replace //-style comments 2009-11-17 16:16:30 -07:00
José Fonseca 5eba607db6 util: Drop return value from cpuid(). 2009-10-28 11:26:26 +00:00
José Fonseca 0426227b68 util: Fix cpuid on MSVC. 2009-10-28 11:26:26 +00:00
José Fonseca 4797ce0d19 util: Set cpu endianness too. 2009-10-22 19:12:13 +01:00
Marc Dietrich b2b239691d gallium/util: fix cpu detection on ppc
As we are compiling with -D_BSD_SOURCE, sigjmp_buf and siglongjmp
should be replaced by the non-sig functions (see man 3 setjmp).
Tested on linux/cell.
2009-10-21 15:15:03 -06:00
José Fonseca 3ce3c03257 util: Fix cpu detection on Windows. Cleanup. 2009-10-14 17:27:06 +01:00
José Fonseca c595dea23c util: Force ESI register for cpuid's ebx result.
Fixes a segfault and better code. Unfortunately using an arbitrary
register ("=r") causes the gcc to abort when the code is optimized saying
it can't satisfy the constraint. Setting seems to do the trick.
2009-10-09 13:22:42 +01:00
José Fonseca 6971be783b util: Improve the cpuid assembly.
No need to save ebx on 64bit. Use just xchgl. Refer to gcc's cpuid.h header.

Thanks to Uros Bizjak for pointing this out.
2009-10-05 16:49:21 +01:00
José Fonseca 7a7dfb09aa util: Fix cpuid invocation for x86_64. 2009-10-04 22:03:15 +01:00
José Fonseca a81fb2a0d2 util: Cleanup u_cpu_detect, build. Support X86_64 and detect SSE4.1 too.
I was waiting for the need to use this code to arise, and it finally came.

I've tested building this on Linux and Windows, both x86 and x64_64. But
it might break other platforms. Please bear with me and help me fix it.

Many thanks to Dennis Smit who submitted this, and Eric Anholt whose
work this was based on.
2009-09-29 13:59:16 +01:00
José Fonseca 01bd21eef8 gallium: Import Dennis Smit cpu detection code.
It still needs a slight code massasing to integrate with the rest of
gallium (namely mapping the OS_* ARCH_* defines), but I'm commiting anyway
so that it is available to be used when somebody needs it.
2008-03-10 16:45:19 +00:00