• Show log

    Commit

  • Hash : 40b571c9
    Author : Sam Lantinga
    Date : 2016-11-06T10:01:08

    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.
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/SDL.git
    Git SSH git@git.kmx.io:kc3-lang/SDL.git
    Public access ? public
    Description

    Fork of https://github.com/libsdl-org/SDL

    Users
    thodg_m kc3_lang_org thodg_w thodg_l www_kmx_io thodg
    Tags

  • README

  • These are test programs for the SDL library:
    
    	checkkeys	Watch the key events to check the keyboard
    	loopwave	Audio test -- loop playing a WAV file
    	loopwavequeue	Audio test -- loop playing a WAV file with SDL_QueueAudio
    	testaudioinfo	Lists audio device capabilities
    	testerror	Tests multi-threaded error handling
    	testfile	Tests RWops layer
    	testgl2		A very simple example of using OpenGL with SDL
    	testiconv	Tests international string conversion
    	testjoystick	List joysticks and watch joystick events
    	testkeys	List the available keyboard keys
    	testloadso	Tests the loadable library layer
    	testlock	Hacked up test of multi-threading and locking
    	testmultiaudio	Tests using several audio devices
    	testoverlay2	Tests the overlay flickering/scaling during playback.
    	testplatform	Tests types, endianness and cpu capabilities
    	testsem		Tests SDL's semaphore implementation
    	testshape	Tests shaped windows
    	testsprite2	Example of fast sprite movement on the screen
    	testthread	Hacked up test of multi-threading
    	testtimer	Test the timer facilities
    	testver		Check the version and dynamic loading and endianness
    	testwm2		Test window manager -- title, icon, events
    	torturethread	Simple test for thread creation/destruction
    	controllermap   Useful to generate Game Controller API compatible maps
    
    
    
    This directory contains sample.wav, which is a sample from Will Provost's
    song, The Living Proof:
    
         From the album The Living Proof
         Publisher: 5 Guys Named Will
         Copyright 1996 Will Provost
    
    You can get a copy of the full song (and album!) from iTunes...
    
        https://itunes.apple.com/us/album/the-living-proof/id4153978
    
    or Amazon...
    
        http://www.amazon.com/The-Living-Proof-Will-Provost/dp/B00004R8RH
    
    Thanks to Will for permitting us to distribute this sample with SDL!