Commit Graph

42 Commits

Author SHA1 Message Date
Ryan C. Gordon
cc16ae0ff1 cpuinfo: Added SDL_HasAVX512F().
This checks for the "foundation" AVX-512 instructions (that all AVX-512
compatible CPUs support).
2018-05-21 11:35:42 -04:00
Sam Lantinga
a9072159b2 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
0bf446b21a Added min/max macros for the sized SDL datatypes 2017-10-16 14:39:56 -07:00
Sam Lantinga
d77ab77a7a Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Ryan C. Gordon
162885911a cpuinfo: first attempt at SDL_HasNEON() implementation. 2016-11-17 01:15:16 -05:00
Sam Lantinga
f92177479a Shifting a value by more than its bits isn't defined and has varying behavior depending on compiler and platform 2016-11-06 14:13:28 -08:00
Sam Lantinga
d516ea5ace Fixed bug 3468 - _allshr in SDL_stdlib.c is not working properly
Mark Pizzolato

On Windows with Visual Studio, when building SDL as a static library using the x86 (32bit) mode, several intrinsic operations are implemented in code in SDL_stdlib.c.

One of these, _allshr() is not properly implemented and fails for some input.  As a result, some operations on 64bit data elements (long long) don't always work.

I classified this bug as a blocker since things absolutely don't work when the affected code is invoked.  The affected code is only invoked when SDL is compiled in x86 mode on Visual Studio when building a SDL as a static library.  This build environment isn't common, and hence the bug hasn't been noticed previously.

I reopened #2537 and mentioned this problem and provided a fix.  That fix is provided again here along with test code which could be added to some of the SDL test code.  This test code verifies that the x86 intrinsic routines produce the same results as the native x64 instructions which these routines emulate under the Microsoft compiler.  The point of the tests is to make sure that Visual Studio x86 code produces the same results as Visual Studio x64 code.  Some of the arguments (or boundary conditions) may produce different results on other compiler environments, so the tests really shouldn't be run on all compilers.  The test driver only actually exercised code when the compiler defines _MSC_VER, so the driver can generically be invoked without issue.
2016-11-06 10:01:08 -08:00
Philipp Wiesemann
99df4e5235 Added call to SDL_HasAVX2() in platform test program. 2016-10-30 21:01:46 +01:00
Sam Lantinga
255c182471 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Philipp Wiesemann
cb8c446d69 Updated name of assert type in test program. 2015-03-15 19:25:10 +01:00
Philipp Wiesemann
2b26e95343 Removed redundant include statements from test programs.
The needed header files are already included with SDL.h. Still including them in
the test programs is confusing because it somehow suggests they would be needed.
2015-02-18 21:31:21 +01:00
Edward Rudd
73fc93717d switch to use SDL_PRI* macros for long long formatting everywhere. 2014-12-03 12:23:17 -05:00
Sam Lantinga
dba255c1e5 Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Sam Lantinga
921f2abe11 Fixed bug 2376 - no SDL_HasAVX
Haneef Mubarak

AVX is the successor to SSE* and is fairly widely available. As such, it really ought to be detectable.

This functionality ought to be trivial to implement, and not having it means being forced to write an ugly workaround to check for AVX (so that normal SSE can be used if AVX is not available).

Here is an example on detecting AVX from SO (it actually shows ways to cehck for all of teh fancy instructions):

http://stackoverflow.com/questions/6121792/how-to-check-if-a-cpu-supports-the-sse3-instruction-set
2014-02-02 00:33:31 -08:00
Sam Lantinga
a19fbe773d Fixed compiling on Mac OS X, added a system RAM test 2013-10-17 11:56:33 -07:00
Andreas Schiffler
7582a71d05 Fix bug 2034: replace printf by SDL_Log in tests; update loopwave VS solution: copy missing dependency 2013-08-14 23:30:10 -07:00
Sam Lantinga
7eff345ecb Updated the copyright year for the test programs 2013-07-25 09:51:21 -07:00
Ryan C. Gordon
d4f80d6538 Fixed another printf() compiler warning, this time in the 1.3 branch. 2011-08-23 03:12:27 -04:00
Sam Lantinga
cca381f73f Added test of the assertion reporting system 2011-04-19 11:41:45 -07:00
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
f0c424685b SDL 1.3 requires a 64-bit type for the platform. 2011-03-25 13:47:49 -07:00
Sam Lantinga
93c94e872e Fixing permissions 2011-03-11 13:22:43 -08:00
Sam Lantinga
7fa84f6a78 Re-added the 3DNow! and AltiVec instruction support. 2011-02-22 21:44:36 -08:00
Sam Lantinga
aef6fb230a Fixed SSE4 detection, and split it into SSE 4.1 and 4.2 2011-02-11 23:02:35 -08:00
Sam Lantinga
2af371cc2e Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support. 2011-02-11 14:51:04 -08:00
Sam Lantinga
6935f227c7 Fixed test 2011-01-27 20:51:54 -08:00
Sam Lantinga
473652316a Added CPU cache line size to the test output. 2011-01-27 20:49:07 -08:00
Sam Lantinga
14f496cada Fixed compile warning on 64-bit Mac OS X 2010-01-21 07:22:11 +00:00
Sam Lantinga
b4fc8d890d Fixed compiler warnings on 32-bit Linux 2010-01-21 05:49:41 +00:00
Sam Lantinga
993462b7ce Moved the assertion tests to testplatform 2010-01-13 09:48:42 +00:00
Sam Lantinga
dc1ed9e7ef Added SDL_GetCPUCount() to see how many cores are available. 2009-12-16 06:53:53 +00:00
Sam Lantinga
bd908a682f Fixed bug #777
Implemented SDL_GetPlatform()
2009-09-26 10:32:14 +00:00
Sam Lantinga
731c5d1558 Fixed bug #705
Sami N      2009-02-21 11:15:39 PST

Patches two tests that had broken format strings in their *printf()'s.
2009-09-26 09:56:26 +00:00
Sam Lantinga
a1ee906546 Fixed bug #615
Scott McCreary      2008-08-21 10:48:14 PDT

This patch adds support for Haiku.
http://ports.haiku-files.org/browser/haikuports/trunk/media-libs/libsdl/SDL-1.2.13-haiku.diff
Haiku is an open-source recreation of BeOS.  It has better POSIX compliance
than beOS did, and other improved features, which in some cases causes us to
have to "undo" previous BeOS workarounds.
Here's our port log entry for it, showing the steps to force the changes into
configure and Makefile:
http://ports.haiku-files.org/wiki/media-libs/libsdl/1.2.13/1
Note that this was only tried on 1.2.13 stable so far.
Haiku is using a newer config.guess / config.sub that doesn't yet seem to be in
the released libtool, so we are having to copy it in for now.
http://haiku-files.org/files/optional-packages/
2009-09-21 09:21:00 +00:00
Sam Lantinga
92c3984118 Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga
2008-10-04 06:46:59 +00:00
Ryan C. Gordon
b94f08253a Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
Sam Lantinga
6bc598ea61 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
Sam Lantinga
b0519469db Fixes bug #195:
The proper name of Apple's operating system is "Mac OS X" not "MacOS X", as can
bee seen in many places, for example http://www.apple.com/macosx/). This
contrasts the naming of the old operating system, which was called "MacOS" and
today is often refered to as "MacOS Classic".

The attached patches fixes the misuse of the name "MacOS X" in both the SDL12
and sdlweb CVS modules.
2006-04-13 13:08:26 +00:00
Sam Lantinga
62dac2c788 Ugh, more 64-bit cleanup 2006-03-31 06:27:47 +00:00
Sam Lantinga
7e11ec69f9 Updated MacOS Classic MPW build 2006-02-24 09:57:14 +00:00
Sam Lantinga
37049ba983 testplatform replaces testtypes, testendian, and testcpuinfo 2006-02-24 06:49:31 +00:00