{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corert/pulls/comments/49040243","id":49040243,"diff_hunk":"@@ -0,0 +1,43 @@\n+// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information. \n+//\n+\n+#include <unixasmmacros.inc>\n+\n+// WARNING: Code in EHHelpers.cpp makes assumptions about this helper, in particular:\n+// - Function \"InWriteBarrierHelper\" assumes an AV due to passed in null pointer will happen at RhpLockCmpXchg32AVLocation\n+// - Function \"UnwindWriteBarrierToCaller\" assumes the stack contains just the pushed return address\n+// x0 = destination address\n+// w1 = value\n+// w2 = comparand\n+LEAF_ENTRY RhpLockCmpXchg32, _TEXT\n+    mov     x8, x0          // Save value of x0 into x8 as x0 is used for the return value\n+ALTERNATE_ENTRY RhpLockCmpXchg32AVLocation\n+1: // loop\n+    ldaxr   w0, [x8]        // w0 = *x8\n+    cmp     w0, w2 \n+    bne     2f              // if (w0 != w2) goto exit\n+    stlxr   w9, w1, [x8]    // if (w0 == w2) { try *x8 = w1 and goto loop if failed or goto exit }\n+    cbnz    w9, 1b\n+2: // exit","path":"src/Native/Runtime/arm64/Interlocked.S","position":22,"original_position":22,"commit_id":"76b5427a8d93bab66bc9c067d67be8ac3e6e205b","original_commit_id":"76b5427a8d93bab66bc9c067d67be8ac3e6e205b","user":{"login":"jkotas","id":6668460,"avatar_url":"https://avatars.githubusercontent.com/u/6668460?v=3","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"body":"`dmb ish` should be added here. These interlocked operations are expected to have implicit memory barrier.","created_at":"2016-01-07T04:06:34Z","updated_at":"2016-01-07T04:06:34Z","html_url":"https://github.com/dotnet/corert/pull/600#discussion_r49040243","pull_request_url":"https://api.github.com/repos/dotnet/corert/pulls/600","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corert/pulls/comments/49040243"},"html":{"href":"https://github.com/dotnet/corert/pull/600#discussion_r49040243"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corert/pulls/600"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corert/pulls/600","id":55294861,"html_url":"https://github.com/dotnet/corert/pull/600","diff_url":"https://github.com/dotnet/corert/pull/600.diff","patch_url":"https://github.com/dotnet/corert/pull/600.patch","issue_url":"https://api.github.com/repos/dotnet/corert/issues/600","number":600,"state":"open","locked":false,"title":"Initial support for Interlocked on arm/arm64","user":{"login":"manu-silicon","id":13194660,"avatar_url":"https://avatars.githubusercontent.com/u/13194660?v=3","gravatar_id":"","url":"https://api.github.com/users/manu-silicon","html_url":"https://github.com/manu-silicon","followers_url":"https://api.github.com/users/manu-silicon/followers","following_url":"https://api.github.com/users/manu-silicon/following{/other_user}","gists_url":"https://api.github.com/users/manu-silicon/gists{/gist_id}","starred_url":"https://api.github.com/users/manu-silicon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manu-silicon/subscriptions","organizations_url":"https://api.github.com/users/manu-silicon/orgs","repos_url":"https://api.github.com/users/manu-silicon/repos","events_url":"https://api.github.com/users/manu-silicon/events{/privacy}","received_events_url":"https://api.github.com/users/manu-silicon/received_events","type":"User","site_admin":false},"body":"Added initial implementation for RhpLockCmpXchg32 and RhpLockCmpXchg64 for arm64. The arm version is not implemented yet.\r\n\r\nI'm not sure about the meaning of AV and the alternate entries RhpLockCmpXchg32AVLocation and RhpLockCmpXchg64AVLocation.\r\n\r\n","created_at":"2016-01-07T03:05:10Z","updated_at":"2016-01-07T04:06:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30469a24b7a39829389cebad0ef274ef70c2f9ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corert/pulls/600/commits","review_comments_url":"https://api.github.com/repos/dotnet/corert/pulls/600/comments","review_comment_url":"https://api.github.com/repos/dotnet/corert/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corert/issues/600/comments","statuses_url":"https://api.github.com/repos/dotnet/corert/statuses/76b5427a8d93bab66bc9c067d67be8ac3e6e205b","head":{"label":"manu-silicon:interlocked_arm","ref":"interlocked_arm","sha":"76b5427a8d93bab66bc9c067d67be8ac3e6e205b","user":{"login":"manu-silicon","id":13194660,"avatar_url":"https://avatars.githubusercontent.com/u/13194660?v=3","gravatar_id":"","url":"https://api.github.com/users/manu-silicon","html_url":"https://github.com/manu-silicon","followers_url":"https://api.github.com/users/manu-silicon/followers","following_url":"https://api.github.com/users/manu-silicon/following{/other_user}","gists_url":"https://api.github.com/users/manu-silicon/gists{/gist_id}","starred_url":"https://api.github.com/users/manu-silicon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manu-silicon/subscriptions","organizations_url":"https://api.github.com/users/manu-silicon/orgs","repos_url":"https://api.github.com/users/manu-silicon/repos","events_url":"https://api.github.com/users/manu-silicon/events{/privacy}","received_events_url":"https://api.github.com/users/manu-silicon/received_events","type":"User","site_admin":false},"repo":{"id":46469885,"name":"corert","full_name":"manu-silicon/corert","owner":{"login":"manu-silicon","id":13194660,"avatar_url":"https://avatars.githubusercontent.com/u/13194660?v=3","gravatar_id":"","url":"https://api.github.com/users/manu-silicon","html_url":"https://github.com/manu-silicon","followers_url":"https://api.github.com/users/manu-silicon/followers","following_url":"https://api.github.com/users/manu-silicon/following{/other_user}","gists_url":"https://api.github.com/users/manu-silicon/gists{/gist_id}","starred_url":"https://api.github.com/users/manu-silicon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manu-silicon/subscriptions","organizations_url":"https://api.github.com/users/manu-silicon/orgs","repos_url":"https://api.github.com/users/manu-silicon/repos","events_url":"https://api.github.com/users/manu-silicon/events{/privacy}","received_events_url":"https://api.github.com/users/manu-silicon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manu-silicon/corert","description":"This repo contains CoreRT, a .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying .NET Native compiler toolchain.","fork":true,"url":"https://api.github.com/repos/manu-silicon/corert","forks_url":"https://api.github.com/repos/manu-silicon/corert/forks","keys_url":"https://api.github.com/repos/manu-silicon/corert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manu-silicon/corert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manu-silicon/corert/teams","hooks_url":"https://api.github.com/repos/manu-silicon/corert/hooks","issue_events_url":"https://api.github.com/repos/manu-silicon/corert/issues/events{/number}","events_url":"https://api.github.com/repos/manu-silicon/corert/events","assignees_url":"https://api.github.com/repos/manu-silicon/corert/assignees{/user}","branches_url":"https://api.github.com/repos/manu-silicon/corert/branches{/branch}","tags_url":"https://api.github.com/repos/manu-silicon/corert/tags","blobs_url":"https://api.github.com/repos/manu-silicon/corert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manu-silicon/corert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manu-silicon/corert/git/refs{/sha}","trees_url":"https://api.github.com/repos/manu-silicon/corert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manu-silicon/corert/statuses/{sha}","languages_url":"https://api.github.com/repos/manu-silicon/corert/languages","stargazers_url":"https://api.github.com/repos/manu-silicon/corert/stargazers","contributors_url":"https://api.github.com/repos/manu-silicon/corert/contributors","subscribers_url":"https://api.github.com/repos/manu-silicon/corert/subscribers","subscription_url":"https://api.github.com/repos/manu-silicon/corert/subscription","commits_url":"https://api.github.com/repos/manu-silicon/corert/commits{/sha}","git_commits_url":"https://api.github.com/repos/manu-silicon/corert/git/commits{/sha}","comments_url":"https://api.github.com/repos/manu-silicon/corert/comments{/number}","issue_comment_url":"https://api.github.com/repos/manu-silicon/corert/issues/comments{/number}","contents_url":"https://api.github.com/repos/manu-silicon/corert/contents/{+path}","compare_url":"https://api.github.com/repos/manu-silicon/corert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manu-silicon/corert/merges","archive_url":"https://api.github.com/repos/manu-silicon/corert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manu-silicon/corert/downloads","issues_url":"https://api.github.com/repos/manu-silicon/corert/issues{/number}","pulls_url":"https://api.github.com/repos/manu-silicon/corert/pulls{/number}","milestones_url":"https://api.github.com/repos/manu-silicon/corert/milestones{/number}","notifications_url":"https://api.github.com/repos/manu-silicon/corert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manu-silicon/corert/labels{/name}","releases_url":"https://api.github.com/repos/manu-silicon/corert/releases{/id}","created_at":"2015-11-19T05:30:44Z","updated_at":"2015-11-19T05:56:45Z","pushed_at":"2016-01-07T03:02:36Z","git_url":"git://github.com/manu-silicon/corert.git","ssh_url":"git@github.com:manu-silicon/corert.git","clone_url":"https://github.com/manu-silicon/corert.git","svn_url":"https://github.com/manu-silicon/corert","homepage":"http://dotnet.github.io/","size":5490,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"7ff4c3c14eda52ece4a090558caabecb566f8b82","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":42552143,"name":"corert","full_name":"dotnet/corert","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corert","description":"This repo contains CoreRT, a .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying .NET Native compiler toolchain.","fork":false,"url":"https://api.github.com/repos/dotnet/corert","forks_url":"https://api.github.com/repos/dotnet/corert/forks","keys_url":"https://api.github.com/repos/dotnet/corert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corert/teams","hooks_url":"https://api.github.com/repos/dotnet/corert/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corert/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corert/events","assignees_url":"https://api.github.com/repos/dotnet/corert/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corert/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corert/tags","blobs_url":"https://api.github.com/repos/dotnet/corert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corert/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corert/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corert/languages","stargazers_url":"https://api.github.com/repos/dotnet/corert/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corert/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corert/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corert/subscription","commits_url":"https://api.github.com/repos/dotnet/corert/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corert/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corert/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corert/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corert/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corert/merges","archive_url":"https://api.github.com/repos/dotnet/corert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corert/downloads","issues_url":"https://api.github.com/repos/dotnet/corert/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corert/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corert/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corert/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corert/releases{/id}","created_at":"2015-09-15T23:10:53Z","updated_at":"2016-01-06T16:25:24Z","pushed_at":"2016-01-07T03:05:10Z","git_url":"git://github.com/dotnet/corert.git","ssh_url":"git@github.com:dotnet/corert.git","clone_url":"https://github.com/dotnet/corert.git","svn_url":"https://github.com/dotnet/corert","homepage":"http://dotnet.github.io/","size":6160,"stargazers_count":188,"watchers_count":188,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":105,"forks":55,"open_issues":105,"watchers":188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corert/pulls/600"},"html":{"href":"https://github.com/dotnet/corert/pull/600"},"issue":{"href":"https://api.github.com/repos/dotnet/corert/issues/600"},"comments":{"href":"https://api.github.com/repos/dotnet/corert/issues/600/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corert/pulls/600/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corert/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corert/pulls/600/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corert/statuses/76b5427a8d93bab66bc9c067d67be8ac3e6e205b"}}}}