{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/60","repository_url":"https://api.github.com/repos/WebAssembly/tool-conventions","labels_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/60/comments","events_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/60/events","html_url":"https://github.com/WebAssembly/tool-conventions/issues/60","id":348117522,"node_id":"MDU6SXNzdWUzNDgxMTc1MjI=","number":60,"title":"C++ volatile support","user":{"login":"aheejin","id":8726997,"node_id":"MDQ6VXNlcjg3MjY5OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/8726997?v=4","gravatar_id":"","url":"https://api.github.com/users/aheejin","html_url":"https://github.com/aheejin","followers_url":"https://api.github.com/users/aheejin/followers","following_url":"https://api.github.com/users/aheejin/following{/other_user}","gists_url":"https://api.github.com/users/aheejin/gists{/gist_id}","starred_url":"https://api.github.com/users/aheejin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aheejin/subscriptions","organizations_url":"https://api.github.com/users/aheejin/orgs","repos_url":"https://api.github.com/users/aheejin/repos","events_url":"https://api.github.com/users/aheejin/events{/privacy}","received_events_url":"https://api.github.com/users/aheejin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2018-08-06T23:43:24Z","updated_at":"2018-08-24T17:08:35Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Recently we had a few discussions on how to support C++ `volatile`. Some discussion thread started in [this CL](https://reviews.llvm.org/D49194) (the CL itself was not terribly relevant though; the discussions went in the comments below) and [the CG meeting on July 24](https://github.com/WebAssembly/meetings/blob/master/2018/CG-07-24.md). While the discussion in the CG meeting was very informative, the topic is not directly relevant with the wasm spec itself, so maybe this repo is a better place for future discussions.\r\n\r\nSummary of discussions so far:\r\n- LLVM's `-fms-volatile` option turns volatiles into atomics, and this option is the default for MSVC, so there is a precedent for turning volatiles into atomic operations by default in LLVM.\r\n- asm.js fastcomp also currently converts volatiles to atomics.\r\n- @jfbastien suggested we should be user friendly by converting volatiles into atomics. For larger sizes not supported naturally by wasm, we can even tear them, because volatiles can tear. If we turn volatile load/stores into regular load stores, the volatile's guarantee that every byte should be touched only once per instruction is not satisfied anymore.\r\n- Some people expressed concerns that by converting volatiles into sequentially consistent atomics, we are making it too strong, and if we support relaxed memory models in future, code that used to work might break.\r\n- @sunfishcode suggested we'd better be consistent with other targets, and people who what to use that feature should turn on the option.\r\n"},"comment":{"url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/comments/415821825","html_url":"https://github.com/WebAssembly/tool-conventions/issues/60#issuecomment-415821825","issue_url":"https://api.github.com/repos/WebAssembly/tool-conventions/issues/60","id":415821825,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTgyMTgyNQ==","user":{"login":"jfbastien","id":298127,"node_id":"MDQ6VXNlcjI5ODEyNw==","avatar_url":"https://avatars3.githubusercontent.com/u/298127?v=4","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},"created_at":"2018-08-24T17:08:35Z","updated_at":"2018-08-24T17:08:35Z","author_association":"MEMBER","body":"> If you've stated, anywhere in this thread, why -fms-volatile isn't the semantics we want here, I can't find it.\r\n\r\nhttps://github.com/WebAssembly/tool-conventions/issues/60#issuecomment-411288138\r\n"}}
{"actor":{"display_login":"jfbastien"}}