{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten-fastcomp/issues/96","labels_url":"https://api.github.com/repos/kripken/emscripten-fastcomp/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten-fastcomp/issues/96/comments","events_url":"https://api.github.com/repos/kripken/emscripten-fastcomp/issues/96/events","html_url":"https://github.com/kripken/emscripten-fastcomp/pull/96","id":70227711,"number":96,"title":"Disable atomics more cleanly","user":{"login":"jfbastien","id":298127,"avatar_url":"https://avatars.githubusercontent.com/u/298127?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbastien","html_url":"https://github.com/jfbastien","followers_url":"https://api.github.com/users/jfbastien/followers","following_url":"https://api.github.com/users/jfbastien/following{/other_user}","gists_url":"https://api.github.com/users/jfbastien/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbastien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbastien/subscriptions","organizations_url":"https://api.github.com/users/jfbastien/orgs","repos_url":"https://api.github.com/users/jfbastien/repos","events_url":"https://api.github.com/users/jfbastien/events{/privacy}","received_events_url":"https://api.github.com/users/jfbastien/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-22T20:30:33Z","updated_at":"2015-04-23T07:47:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kripken/emscripten-fastcomp/pulls/96","html_url":"https://github.com/kripken/emscripten-fastcomp/pull/96","diff_url":"https://github.com/kripken/emscripten-fastcomp/pull/96.diff","patch_url":"https://github.com/kripken/emscripten-fastcomp/pull/96.patch"},"body":"Atomics rewriting to PNaCl's own intrinsics wasn't quite clean, and was missing cmpxchg. This patch reverts the change from RewriteAtomics and just disable the pass in PNaClABISimplify."},"comment":{"url":"https://api.github.com/repos/kripken/emscripten-fastcomp/issues/comments/95479377","html_url":"https://github.com/kripken/emscripten-fastcomp/pull/96#issuecomment-95479377","issue_url":"https://api.github.com/repos/kripken/emscripten-fastcomp/issues/96","id":95479377,"user":{"login":"juj","id":225351,"avatar_url":"https://avatars.githubusercontent.com/u/225351?v=3","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T07:47:33Z","updated_at":"2015-04-23T07:47:33Z","body":"For the Emscripten pthreads branch, I had to also add a `return;` to `visitAtomicCmpXchgInst` (https://github.com/juj/emscripten-fastcomp/commit/89ea50b6ab421bf26bd9789c0515ac7673d69793#diff-6dcdc7a6e10f4a3c4d284a86894ca0a3R385), or otherwise calling e.g. GCC cmpxchg intrinsic would cause a NaCl intrinsic to be generated, on which JSBackend would later on abort when it saw that as an unrecognized instruction (test at https://github.com/juj/emscripten/blob/pthreads/tests/pthread/test_pthread_gcc_atomics.cpp#L34 showed this iirc). I'm under the impression that we'd never need `visitAtomicCmpXchgInst` to execute(?)."}}