{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/36567860","id":36567860,"diff_hunk":"@@ -1498,7 +1520,76 @@ CodeGen::genCodeForTreeNode(GenTreePtr treeNode)\n \n     case GT_STOREIND:\n         {\n-            NYI(\"GT_STOREIND\");\n+            GenTree* data = treeNode->gtOp.gtOp2;\n+            GenTree* addr = treeNode->gtOp.gtOp1;\n+            GCInfo::WriteBarrierForm writeBarrierForm = gcInfo.gcIsWriteBarrierCandidate(treeNode, data);\n+            if (writeBarrierForm != GCInfo::WBF_NoBarrier)\n+            {\n+                // data and addr must be in registers.\n+                // Consume both registers so that any copies of interfering\n+                // registers are taken care of.\n+                genConsumeOperands(treeNode->AsOp());\n+                \n+                // At this point, we should not have any interference.\n+                // That is, 'data' must not be in REG_ARG_0,\n+                //  as that is where 'addr' must go.\n+                noway_assert(data->gtRegNum != REG_ARG_0);\n+\n+                // addr goes in REG_ARG_0\n+                if (addr->gtRegNum != REG_ARG_0)\n+                {\n+                    inst_RV_RV(INS_mov, REG_ARG_0, addr->gtRegNum, addr->TypeGet());\n+                }\n+\n+                // data goes in REG_ARG_1\n+                if (data->gtRegNum != REG_ARG_1)\n+                {\n+                    inst_RV_RV(INS_mov, REG_ARG_1, data->gtRegNum, data->TypeGet());\n+                }\n+\n+                genGCWriteBarrier(treeNode, writeBarrierForm);\n+            }\n+            else\n+            {\n+                bool reverseOps = ((treeNode->gtFlags & GTF_REVERSE_OPS) != 0);\n+                bool dataIsUnary = false;\n+                GenTree* nonRMWsrc = nullptr;\n+                // We must consume the operands in the proper execution order, \n+                // so that liveness is updated appropriately.\n+                if (!reverseOps)\n+                {\n+                    genConsumeAddress(addr);\n+                }\n+                if (data->isContained() && !data->OperIsLeaf())\n+                {\n+                    dataIsUnary = (GenTree::OperIsUnary(data->OperGet()) != 0);\n+                    if (!dataIsUnary)\n+                    {\n+                        nonRMWsrc = data->gtGetOp1();\n+                        if (nonRMWsrc->isIndir() && Lowering::IndirsAreEquivalent(nonRMWsrc, treeNode))\n+                        {\n+                            nonRMWsrc = data->gtGetOp2();\n+                        }\n+                        genConsumeRegs(nonRMWsrc);\n+                    }\n+                }\n+                else\n+                {\n+                    genConsumeRegs(data);\n+                }\n+                if (reverseOps)\n+                {\n+                    genConsumeAddress(addr);\n+                }\n+                if (data->isContained() && !data->OperIsLeaf())\n+                {\n+                    NYI(\"RMW?\");\n+                }\n+                else\n+                {\n+                    emit->emitInsMov(ins_Store(targetType), emitTypeSize(treeNode), treeNode);\n+                }\n+            }","path":"src/jit/codegenarm.cpp","position":137,"original_position":137,"commit_id":"a80ec35408a20acf5a1a5a2cb62374ca61dc395f","original_commit_id":"a80ec35408a20acf5a1a5a2cb62374ca61dc395f","user":{"login":"BruceForstall","id":10901265,"avatar_url":"https://avatars.githubusercontent.com/u/10901265?v=3","gravatar_id":"","url":"https://api.github.com/users/BruceForstall","html_url":"https://github.com/BruceForstall","followers_url":"https://api.github.com/users/BruceForstall/followers","following_url":"https://api.github.com/users/BruceForstall/following{/other_user}","gists_url":"https://api.github.com/users/BruceForstall/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceForstall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceForstall/subscriptions","organizations_url":"https://api.github.com/users/BruceForstall/orgs","repos_url":"https://api.github.com/users/BruceForstall/repos","events_url":"https://api.github.com/users/BruceForstall/events{/privacy}","received_events_url":"https://api.github.com/users/BruceForstall/received_events","type":"User","site_admin":false},"body":"It looks like you copied/modified this block from the AMD64 implementation. You might want to copy/modify from the ARM64 implementation instead. E.g., there's no read-modify-write on ARM.","created_at":"2015-08-07T22:43:50Z","updated_at":"2015-08-07T22:43:50Z","html_url":"https://github.com/dotnet/coreclr/pull/1353#discussion_r36567860","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/1353","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/36567860"},"html":{"href":"https://github.com/dotnet/coreclr/pull/1353#discussion_r36567860"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1353"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/1353","id":41734961,"html_url":"https://github.com/dotnet/coreclr/pull/1353","diff_url":"https://github.com/dotnet/coreclr/pull/1353.diff","patch_url":"https://github.com/dotnet/coreclr/pull/1353.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/1353","number":1353,"state":"open","locked":false,"title":"[WIP] Initial ARM RyuJIT bring up","user":{"login":"benpye","id":442623,"avatar_url":"https://avatars.githubusercontent.com/u/442623?v=3","gravatar_id":"","url":"https://api.github.com/users/benpye","html_url":"https://github.com/benpye","followers_url":"https://api.github.com/users/benpye/followers","following_url":"https://api.github.com/users/benpye/following{/other_user}","gists_url":"https://api.github.com/users/benpye/gists{/gist_id}","starred_url":"https://api.github.com/users/benpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpye/subscriptions","organizations_url":"https://api.github.com/users/benpye/orgs","repos_url":"https://api.github.com/users/benpye/repos","events_url":"https://api.github.com/users/benpye/events{/privacy}","received_events_url":"https://api.github.com/users/benpye/received_events","type":"User","site_admin":false},"body":"This PR is to track my initial attempt to get the ARM RyuJIT backend to the point where it will execute a simple \"Hello World\". Currently this is to get feedback on the changes I am making to ensure I am not going in wrong direction or am doing anything obviously wrong to anyone who works on the JIT.\r\n\r\nCurrently when running a simple \"Hello World\" the JIT will successfully generate the `System.AppDomain:SetupDomain` method, begin to generate `System.AppDomain:SetupFusionStore` and then fail on an assertion, the full output of the debug coreclr with `COMPlus_JitDisasm=*` and COMPlus_DumpJittedMethods=1` is at https://gist.github.com/benpye/a4fcc0154c6d69efe875","created_at":"2015-08-05T22:45:18Z","updated_at":"2015-08-07T22:43:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d193e9a86e009cab94d683255bb9e90c06b43433","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/1353/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/1353/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/1353/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/a80ec35408a20acf5a1a5a2cb62374ca61dc395f","head":{"label":"benpye:arm-ryujit","ref":"arm-ryujit","sha":"a80ec35408a20acf5a1a5a2cb62374ca61dc395f","user":{"login":"benpye","id":442623,"avatar_url":"https://avatars.githubusercontent.com/u/442623?v=3","gravatar_id":"","url":"https://api.github.com/users/benpye","html_url":"https://github.com/benpye","followers_url":"https://api.github.com/users/benpye/followers","following_url":"https://api.github.com/users/benpye/following{/other_user}","gists_url":"https://api.github.com/users/benpye/gists{/gist_id}","starred_url":"https://api.github.com/users/benpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpye/subscriptions","organizations_url":"https://api.github.com/users/benpye/orgs","repos_url":"https://api.github.com/users/benpye/repos","events_url":"https://api.github.com/users/benpye/events{/privacy}","received_events_url":"https://api.github.com/users/benpye/received_events","type":"User","site_admin":false},"repo":{"id":30714471,"name":"coreclr","full_name":"benpye/coreclr","owner":{"login":"benpye","id":442623,"avatar_url":"https://avatars.githubusercontent.com/u/442623?v=3","gravatar_id":"","url":"https://api.github.com/users/benpye","html_url":"https://github.com/benpye","followers_url":"https://api.github.com/users/benpye/followers","following_url":"https://api.github.com/users/benpye/following{/other_user}","gists_url":"https://api.github.com/users/benpye/gists{/gist_id}","starred_url":"https://api.github.com/users/benpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpye/subscriptions","organizations_url":"https://api.github.com/users/benpye/orgs","repos_url":"https://api.github.com/users/benpye/repos","events_url":"https://api.github.com/users/benpye/events{/privacy}","received_events_url":"https://api.github.com/users/benpye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benpye/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/benpye/coreclr","forks_url":"https://api.github.com/repos/benpye/coreclr/forks","keys_url":"https://api.github.com/repos/benpye/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benpye/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benpye/coreclr/teams","hooks_url":"https://api.github.com/repos/benpye/coreclr/hooks","issue_events_url":"https://api.github.com/repos/benpye/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/benpye/coreclr/events","assignees_url":"https://api.github.com/repos/benpye/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/benpye/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/benpye/coreclr/tags","blobs_url":"https://api.github.com/repos/benpye/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benpye/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benpye/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/benpye/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benpye/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/benpye/coreclr/languages","stargazers_url":"https://api.github.com/repos/benpye/coreclr/stargazers","contributors_url":"https://api.github.com/repos/benpye/coreclr/contributors","subscribers_url":"https://api.github.com/repos/benpye/coreclr/subscribers","subscription_url":"https://api.github.com/repos/benpye/coreclr/subscription","commits_url":"https://api.github.com/repos/benpye/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/benpye/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/benpye/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/benpye/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/benpye/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/benpye/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benpye/coreclr/merges","archive_url":"https://api.github.com/repos/benpye/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benpye/coreclr/downloads","issues_url":"https://api.github.com/repos/benpye/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/benpye/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/benpye/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/benpye/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benpye/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/benpye/coreclr/releases{/id}","created_at":"2015-02-12T17:32:53Z","updated_at":"2015-07-01T15:47:17Z","pushed_at":"2015-08-07T15:45:06Z","git_url":"git://github.com/benpye/coreclr.git","ssh_url":"git@github.com:benpye/coreclr.git","clone_url":"https://github.com/benpye/coreclr.git","svn_url":"https://github.com/benpye/coreclr","homepage":"","size":36382,"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":"db8ca2f23fc8865f1a3b6d7c861db448c977b02f","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":30092893,"name":"coreclr","full_name":"dotnet/coreclr","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/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","created_at":"2015-01-30T22:10:02Z","updated_at":"2015-08-07T21:55:38Z","pushed_at":"2015-08-07T21:53:08Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"http://dotnet.github.io/core/","size":52835,"stargazers_count":5009,"watchers_count":5009,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":991,"mirror_url":null,"open_issues_count":232,"forks":991,"open_issues":232,"watchers":5009,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1353"},"html":{"href":"https://github.com/dotnet/coreclr/pull/1353"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/1353"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/1353/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1353/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1353/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/a80ec35408a20acf5a1a5a2cb62374ca61dc395f"}}}}