summaryrefslogtreecommitdiffstats
path: root/cpudetect.c
Commit message (Collapse)AuthorAgeFilesLines
* cpudetect: remove unused/forgotten crapwm42012-08-011-1/+0
|
* Remove compile time/runtime CPU detection, and drop some platformswm42012-07-301-483/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer had three ways of enabling CPU specific assembler routines: a) Enable them at compile time; crash if the CPU can't handle it. b) Enable them at compile time, but let the configure script detect your CPU. Your binary will only crash if you try to run it on a different system that has less features than yours. This was the default, I think. c) Runtime detection. The implementation of b) and c) suck. a) is not really feasible (it sucks for users). Remove all code related to this, and use libav's CPU detection instead. Now the configure script will always enable CPU specific features, and disable them at runtime if libav reports them not as available. One implication is that now the compiler is always expected to handle SSE (etc.) inline assembly at runtime, unless it's explicitly disabled. Only checks for x86 CPU specific features are kept, the rest is either unused or barely used. Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler to select decent settings. Get rid of support for the following operating systems: - BSD/OS (some ancient BSD fork) - QNX (don't care) - BeOS (dead, Haiku support is still welcome) - AIX (don't care) - HP-UX (don't care) - OS/2 (dead, actual support has been removed a while ago) Remove the configure code for detecting the endianness. Instead, use the standard header <endian.h>, which can be used if _GNU_SOURCE or _BSD_SOURCE is defined. (Maybe these changes should have been in a separate commit.) Since this is a quite violent code removal orgy, and I'm testing only on x86 32 bit Linux, expect regressions.
* build: remove OS/2 supportUoti Urpala2012-04-061-30/+0
|
* cpudetect.c: check OS SSE support only with runtime detectionreimar2011-07-061-1/+4
| | | | | | | | Run OS support for SSE check only for runtime CPU detection. It is pointless to run it otherwise and it causes issues on OSes where we have not implemented a way to check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33713 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move code to avoid forward declarations in top-level .c filesdiego2010-11-021-168/+168
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32421 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Reuse do_cpuid from cpudetect.c in loader/win32.creimar2010-11-021-1/+1
| | | | | | Also avoids several "used uninitialized" warnings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31905 b3059339-0415-0410-9bf9-f77b7e298cf2
* cpuid.c: Remove outdated codereimar2010-11-021-8/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31904 b3059339-0415-0410-9bf9-f77b7e298cf2
* the great MPlayer tab removal: part IIdiego2010-05-031-300/+299
| | | | | | | some extra indentation fixes are put in as a bonus git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31134 b3059339-0415-0410-9bf9-f77b7e298cf2
* Leave disabling SSE to the check_os_katmai_support always regardless of OS,reimar2010-03-271-8/+0
| | | | | | | | it can already handle all cases, will always print a proper warning and probably fixes SSE being disabled on x86_64 Solaris systems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30971 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename SGI_MIPS architecture to plain MIPS.diego2010-03-171-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30924 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add license header to all top-level files missing them.diego2010-01-301-0/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-13/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename RUNTIME_CPUDETECT to CONFIG_RUNTIME_CPUDETECT and always define it.ramiro2009-04-081-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29154 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary malloc.h #includes and related #ifdeffery.diego2009-04-021-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29126 b3059339-0415-0410-9bf9-f77b7e298cf2
* Sync cpuid detection code with libavcodec: assume it is always available on ↵reimar2009-03-271-13/+7
| | | | | | x86_64 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29069 b3059339-0415-0410-9bf9-f77b7e298cf2
* SSE3 support patch by Zhou Zongyi, zhouzongyi pset.suntec netdiego2009-03-121-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28936 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of the outdated and unmaintained CPU codename table.zuxy2009-02-231-40/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28704 b3059339-0415-0410-9bf9-f77b7e298cf2
* Convert HAVE_MALLOC_H into a 0/1 definition, fixes the warning:diego2009-02-171-1/+1
| | | | | | | mem.c:32:5: warning: "HAVE_MALLOC_H" is not defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28629 b3059339-0415-0410-9bf9-f77b7e298cf2
* Print information about detected CPU in verbose mode only.diego2009-02-091-14/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28493 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use OS preprocessor checks with '#if defined()' consistently.diego2009-01-301-17/+7
| | | | | | | Avoids undefined preprocessor directives warnings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28399 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace another bunch of '#if HAVE_FOO' preprocessor checks by 'if (HAVE_FOO)'.diego2009-01-261-22/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28377 b3059339-0415-0410-9bf9-f77b7e298cf2
* HAVE_3DNOW --> HAVE_AMD3DNOWdiego2009-01-261-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28370 b3059339-0415-0410-9bf9-f77b7e298cf2
* HAVE_3DNOWEX --> HAVE_3DNOWEXTdiego2009-01-251-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28361 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix wrong #ifdef/#ifndef -> #if conversion in r28323gpoirier2009-01-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28332 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a wrongly converted !defined(ARCH_X86_64)reimar2009-01-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28330 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix first handful of #if vs. #ifdef for ARCH_, HAVE_SSE etc.reimar2009-01-161-22/+22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28323 b3059339-0415-0410-9bf9-f77b7e298cf2
* one more ARCH_ARMV4L --> ARCH_ARM, patch by Guillaume Lecerf, foxcore gmail comdiego2009-01-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28320 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set and use only ARCH_PPC, not also ARCH_POWERPC.diego2008-12-271-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28196 b3059339-0415-0410-9bf9-f77b7e298cf2
* Correct detection of SSSE3 and SSE4a feature bits.zuxy2008-11-301-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28049 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace pushf/popf by explicit pushfl/popfl (32 bit) or pushfq/popfqcehoyos2008-11-251-3/+12
| | | | | | | | (x86_64), to fix generated code on ICC 11.0. Original FFmpeg patch by Reimar. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28037 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add detection of x86 CPU features SSSE3 and SSE4a.gpoirier2008-11-191-0/+4
| | | | | | | | | | Patch by Zhou, Zongyi %zz65 A cornell P edu% Original thread: date: Wed, Nov 19, 2008 at 4:22 PM subject: Re: [MPlayer-dev-eng] [PATCH] yadif SSE2/SSSE3 optimization git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27960 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace all occurrences of '__volatile__' and '__volatile' by plain 'volatile'.diego2008-10-161-7/+7
| | | | | | | | We were using an inconsistent mix of the three variants and 'volatile' should be the most correct and portable variant. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27791 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.diego2008-10-161-7/+7
| | | | | | | Neither variant is valid C99 syntax, but __asm__ is the most portable variant. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27788 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.diego2008-10-131-4/+4
| | | | | | | This avoids a pointless indirection that only obscures what is really done. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify cpudetect OS-support detection code, e.g. using one mp_msg to print ↵reimar2008-09-181-28/+8
| | | | | | | | | either yes or no instead of two. Should not change code behaviour. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27637 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove pointless '#if 1 [...] #endif' around has_cpuid() function.diego2008-08-291-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27491 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove useless parentheses from return statements.diego2008-05-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2
* Wrap HAVE_XXX macros with RUNTIME_CPUDETECT, because when RUNTIME_CPUDETECT isdiego2008-02-241-0/+2
| | | | | | | | enabled, checking HAVE_XXX and disabling that CPU feature is meaningless. patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26094 b3059339-0415-0410-9bf9-f77b7e298cf2
* Enable SSE detection on OS/2.diego2008-02-241-1/+35
| | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26093 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Break one unreadable long line.diego2008-02-241-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26092 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add #include <sys/sysctl.h> for Mac OS X, fixes the warningdiego2008-02-241-1/+1
| | | | | | | | cpudetect.c:344: warning: implicit declaration of function sysctlbyname patch by Elias Pipping, elias pipping org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26085 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for xtensa CPU architecturediego2007-12-111-0/+4
| | | | | | | patch by Dan Nicolaescu (dann ics.uci edu), Reimar and me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25368 b3059339-0415-0410-9bf9-f77b7e298cf2
* Slightly simplify preprocessor conditionals.diego2007-12-111-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25367 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ahem, fix breakage of last commit: The AltiVec detection code has threediego2007-12-111-0/+3
| | | | | | | sections, namely OS X, AMIGAOS4 and the rest. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25366 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove redundant and obfuscating preprocessor conditional.diego2007-12-111-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25358 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace SYS_DARWIN conditional by the more correct __APPLE__.diego2007-12-111-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25357 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix warning:diego2007-10-011-1/+0
| | | | | | | | cpudetect.c: In function 'check_os_katmai_support': cpudetect.c:395: warning: unused variable 'saved_sigfpe' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24684 b3059339-0415-0410-9bf9-f77b7e298cf2
* Enable SSE on MinGW, many builds out there seem to use it without ill effect.diego2007-09-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24662 b3059339-0415-0410-9bf9-f77b7e298cf2
* sigill_handler_sse is not needed and can not compile on 64 bit systemsreimar2007-09-141-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24460 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not check for X86_FXSR_MAGIC define, it is missing in newerreimar2007-09-141-5/+4
| | | | | | | distribution/kernel headers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24459 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused sigfpe handlerreimar2007-09-141-22/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24458 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove test for SSE exception support that has been commented out since ages.reimar2007-09-141-25/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24457 b3059339-0415-0410-9bf9-f77b7e298cf2
* GNU/kFreeBSD support, closes Bugzilla #704.diego2007-01-101-4/+4
| | | | | | | patch by Petr Salinger, Petr.Salinger seznam cz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21866 b3059339-0415-0410-9bf9-f77b7e298cf2
* ARCH_X86 simplificationsreimar2006-11-011-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20593 b3059339-0415-0410-9bf9-f77b7e298cf2
* Detect sse/2 on intel mac, Valtteri Vuorikoski(vuori@sci.fi)nplourde2006-10-051-3/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20058 b3059339-0415-0410-9bf9-f77b7e298cf2
* rm unnecesary void* casts - part 1reynaldo2006-07-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18874 b3059339-0415-0410-9bf9-f77b7e298cf2
* Typo: use ptmpstr instead of tmpstr to strip leading spaces + add gpoirier2006-06-251-2/+2
| | | | | | | | | | | | comment Patch by Zuxy Meng ##zuxy P meng AH gmail P com## --Cette ligne, et les suivantes ci-dessous, seront ignorées-- M cpudetect.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18820 b3059339-0415-0410-9bf9-f77b7e298cf2
* Retrieve CPU built-in namestring, and if it exists, print it during cpu ↵gpoirier2006-05-171-5/+25
| | | | | | detection; t it doesn't exist, fallback to the cpu table. Patch by Zuxy Meng git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18539 b3059339-0415-0410-9bf9-f77b7e298cf2
* add Amiga-style AltiVec detection, patch from andrea at amigasoft dot netpacman2006-02-281-0/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17703 b3059339-0415-0410-9bf9-f77b7e298cf2
* Patch by Stefan Huehner / stefan % huehner ! org \rathann2006-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | patch replaces '()' for the correct '(void)' in function declarations/prototypes which have no parameters. The '()' syntax tell thats there is a variable list of arguments, so that the compiler cannot check this. The extra CFLAG '-Wstrict-declarations' shows those cases. Comments about a similar patch applied to ffmpeg: That in C++ these mean the same, but in ANSI C the semantics are different; function() is an (obsolete) K&R C style forward declaration, it basically means that the function can have any number and any types of parameters, effectively completely preventing the compiler from doing any sort of type checking. -- Erik Slagter Defining functions with unspecified arguments is allowed but bad. With arguments unspecified the compiler can't report an error/warning if the function is called with incorrect arguments. -- Måns Rullgård git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not show cache-line size message, I've never seen a case where it was usefulreimar2005-11-071-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16944 b3059339-0415-0410-9bf9-f77b7e298cf2
* according to Intel/AMD official documentations, CPU family should be ↵gpoirier2005-10-041-2/+5
| | | | | | | | | | | | | | displayed as the sum of CPUID's family field and extended family field when a CPU has a CPUID family 0xF. Patch by Zuxy <zuxy POIS meng AH gmail POIS com> Original thread: Date: Oct 2, 2005 11:08 AM Subject: [MPlayer-dev-eng] [Patch] Correction of P4 family CPUs detection in cputable.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16663 b3059339-0415-0410-9bf9-f77b7e298cf2
* DragonFly BSD supportdiego2005-05-251-3/+3
| | | | | | | patch by Joerg Sonnenberger <joerg - at - britannica - dot - bec - dot - de> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15567 b3059339-0415-0410-9bf9-f77b7e298cf2
* ensure null-termination after snprintfreimar2005-01-121-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14479 b3059339-0415-0410-9bf9-f77b7e298cf2
* assume OS support SSE on x86_64aurel2005-01-101-1/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14456 b3059339-0415-0410-9bf9-f77b7e298cf2
* adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64aurel2004-10-211-13/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13721 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove CPU speed detection sincediego2004-10-131-42/+4
| | | | | | | | | - it is unreliable - it adds a constant 0.1s to startup time - it is hardly a feature for a movie player git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13629 b3059339-0415-0410-9bf9-f77b7e298cf2
* disable buggy sse on mingwfaust32004-06-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12614 b3059339-0415-0410-9bf9-f77b7e298cf2
* SSE support under OpenBSD, patch by Bjorn Sandellalex2004-04-061-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12144 b3059339-0415-0410-9bf9-f77b7e298cf2
* reenable SSE support for mingwfaust32004-04-011-1/+1
| | | | git-svn-id: