kripken/emscripten-fastcomp — pull request #15 by jechter (2014-02-19 10:20:24+00:00)
Title: Fix atomic decrement (operand order of emitted code was flipped).

This code resulted in wrong code being emitted for __sync_sub_and_fetch(val, 1), as it would emit "1-val" instead of "val-1", which would negate the result. I swapped the operand order to fix it. I did the same for all other atomic ops for consistency (everything but Sub should be commutative so it wouldn't matter).