{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/15634","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/15634/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/15634/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/15634/events","html_url":"https://github.com/JuliaLang/julia/pull/15634","id":143701863,"number":15634,"title":"Fix atomics","user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars.githubusercontent.com/u/712232?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-26T12:56:41Z","updated_at":"2016-03-26T14:27:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/15634","html_url":"https://github.com/JuliaLang/julia/pull/15634","diff_url":"https://github.com/JuliaLang/julia/pull/15634.diff","patch_url":"https://github.com/JuliaLang/julia/pull/15634.patch"},"body":"* `WORD_SIZE` is in bits not bytes\r\n* `cmpxchg` can only handle integer types. From [llvm LangRef](http://llvm.org/docs/LangRef.html#id202)\r\n\r\n    > The type of ‘<cmp>’ must be an integer or pointer type whose bit width is a power of two greater than or equal to eight and less than or equal to a target-specific size limit. ‘<cmp>’ and ‘<new>’ must have the same type, and the type of ‘<pointer>’ must be a pointer to that type.\r\n\r\n    Using a floating point type seems to work with x86 backend but is still invalid IR and it fails on aarch64.\r\n\r\nAtomic load on `Int128` seems to have [issues on aarch64](https://llvm.org/bugs/show_bug.cgi?id=27081) too but I'll see if it can be resolved in llvm first.\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/201833267","html_url":"https://github.com/JuliaLang/julia/pull/15634#issuecomment-201833267","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/15634","id":201833267,"user":{"login":"eschnett","id":213514,"avatar_url":"https://avatars.githubusercontent.com/u/213514?v=3","gravatar_id":"","url":"https://api.github.com/users/eschnett","html_url":"https://github.com/eschnett","followers_url":"https://api.github.com/users/eschnett/followers","following_url":"https://api.github.com/users/eschnett/following{/other_user}","gists_url":"https://api.github.com/users/eschnett/gists{/gist_id}","starred_url":"https://api.github.com/users/eschnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eschnett/subscriptions","organizations_url":"https://api.github.com/users/eschnett/orgs","repos_url":"https://api.github.com/users/eschnett/repos","events_url":"https://api.github.com/users/eschnett/events{/privacy}","received_events_url":"https://api.github.com/users/eschnett/received_events","type":"User","site_admin":false},"created_at":"2016-03-26T14:27:26Z","updated_at":"2016-03-26T14:27:26Z","body":"I think it's time for a C++ function that determines the alignment of an object under certain circumstances (type, mutability, architecture, etc.), and make it available from Julia. Currently, entirely too many constants are hardcoded in various parts of the code, and the use of `WORD_SIZE` won't be easy to find when things change again."}}