{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/79713318","id":79713318,"diff_hunk":"@@ -3848,21 +3849,73 @@ void CodeGen::genCodeForCpBlkRepMovs(GenTreeBlk* cpBlkNode)\n     instGen(INS_r_movsb);\n }\n \n-#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING\n+#ifdef FEATURE_PUT_STRUCT_ARG_STK\n+int CodeGen::genMove8IfNeeded(unsigned size, regNumber longTmpReg, GenTree* srcAddr, unsigned offset)\n+{\n+#ifdef _TARGET_X86_\n+    instruction longMovIns = INS_movq;\n+#else  // !_TARGET_X86_\n+    instruction longMovIns = INS_mov;\n+#endif // !_TARGET_X86_\n+    if ((size & 8) != 0)\n+    {\n+        genCodeForLoadOffset(longMovIns, EA_8BYTE, longTmpReg, srcAddr, offset);\n+        genStoreRegToStackArg(TYP_LONG, longTmpReg, offset);\n+        return 8;\n+    }\n+    return 0;\n+}\n+\n+int CodeGen::genMove4IfNeeded(unsigned size, regNumber intTmpReg, GenTree* srcAddr, unsigned offset)\n+{\n+    if ((size & 4) != 0)\n+    {\n+        genCodeForLoadOffset(INS_mov, EA_4BYTE, intTmpReg, srcAddr, offset);\n+        genStoreRegToStackArg(TYP_INT, intTmpReg, offset);\n+        return 4;\n+    }\n+    return 0;\n+}\n+\n+int CodeGen::genMove2IfNeeded(unsigned size, regNumber intTmpReg, GenTree* srcAddr, unsigned offset)\n+{\n+    if ((size & 2) != 0)\n+    {\n+        genCodeForLoadOffset(INS_mov, EA_2BYTE, intTmpReg, srcAddr, offset);\n+        genStoreRegToStackArg(TYP_SHORT, intTmpReg, offset);\n+        return 2;\n+    }\n+    return 0;\n+}\n+\n+int CodeGen::genMove1IfNeeded(unsigned size, regNumber intTmpReg, GenTree* srcAddr, unsigned offset)\n+{\n+\n+    if ((size & 1) != 0)\n+    {\n+        genCodeForLoadOffset(INS_mov, EA_1BYTE, intTmpReg, srcAddr, offset);\n+        genStoreRegToStackArg(TYP_BYTE, intTmpReg, offset);\n+        return 1;\n+    }\n+    return 0;\n+}","path":"src/jit/codegenxarch.cpp","position":191,"original_position":115,"commit_id":"c8b5850a1325423ab966d4f735b916756d311638","original_commit_id":"84b678804b1465b1175a58eba487ba0b5927d872","user":{"login":"CarolEidt","id":2973870,"avatar_url":"https://avatars.githubusercontent.com/u/2973870?v=3","gravatar_id":"","url":"https://api.github.com/users/CarolEidt","html_url":"https://github.com/CarolEidt","followers_url":"https://api.github.com/users/CarolEidt/followers","following_url":"https://api.github.com/users/CarolEidt/following{/other_user}","gists_url":"https://api.github.com/users/CarolEidt/gists{/gist_id}","starred_url":"https://api.github.com/users/CarolEidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarolEidt/subscriptions","organizations_url":"https://api.github.com/users/CarolEidt/orgs","repos_url":"https://api.github.com/users/CarolEidt/repos","events_url":"https://api.github.com/users/CarolEidt/events{/privacy}","received_events_url":"https://api.github.com/users/CarolEidt/received_events","type":"User","site_admin":false},"body":"Done.\r\n\r\n---\r\nIn reply to: [79524614](https://github.com/dotnet/coreclr/pull/7252#discussion_r79524614) [](ancestors = 79524614)","created_at":"2016-09-20T21:10:34Z","updated_at":"2016-09-20T21:10:34Z","html_url":"https://github.com/dotnet/coreclr/pull/7252#discussion_r79713318","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/7252","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/79713318"},"html":{"href":"https://github.com/dotnet/coreclr/pull/7252#discussion_r79713318"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7252"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/7252","id":85742461,"html_url":"https://github.com/dotnet/coreclr/pull/7252","diff_url":"https://github.com/dotnet/coreclr/pull/7252.diff","patch_url":"https://github.com/dotnet/coreclr/pull/7252.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/7252","number":7252,"state":"open","locked":false,"title":"Support GT_OBJ for x86","user":{"login":"CarolEidt","id":2973870,"avatar_url":"https://avatars.githubusercontent.com/u/2973870?v=3","gravatar_id":"","url":"https://api.github.com/users/CarolEidt","html_url":"https://github.com/CarolEidt","followers_url":"https://api.github.com/users/CarolEidt/followers","following_url":"https://api.github.com/users/CarolEidt/following{/other_user}","gists_url":"https://api.github.com/users/CarolEidt/gists{/gist_id}","starred_url":"https://api.github.com/users/CarolEidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarolEidt/subscriptions","organizations_url":"https://api.github.com/users/CarolEidt/orgs","repos_url":"https://api.github.com/users/CarolEidt/repos","events_url":"https://api.github.com/users/CarolEidt/events{/privacy}","received_events_url":"https://api.github.com/users/CarolEidt/received_events","type":"User","site_admin":false},"body":"Add support for GT_OBJ for x86, and allow them to be transformed into a list\r\nof fields (in morph) if it is a promoted struct. Add a new list type for\r\nthis (GT_FIELD_LIST) with the type and offset, and use it for the multireg\r\narg passing as well for consistency.\r\nAlso refactor fgMorphArgs so that there is a positive check for reMorphing,\r\nrather than relying on gtCallLateArgs, which can be null if there are no\r\nregister args.\r\nIn codegenxarch, modify the struct passing (genPutStructArgStk) to work for\r\nboth the x64/ux and x86 case, including the option of pushing fields onto\r\nthe stack.\r\nEliminate the redundant INS_movs_ptr, and replace with the pre-existing\r\nINS_movsp.","created_at":"2016-09-19T06:19:54Z","updated_at":"2016-09-20T21:10:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d80951743e12d70b4160e60b82229c1e61141062","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/7252/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/7252/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/7252/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/c8b5850a1325423ab966d4f735b916756d311638","head":{"label":"CarolEidt:x86GtObj","ref":"x86GtObj","sha":"c8b5850a1325423ab966d4f735b916756d311638","user":{"login":"CarolEidt","id":2973870,"avatar_url":"https://avatars.githubusercontent.com/u/2973870?v=3","gravatar_id":"","url":"https://api.github.com/users/CarolEidt","html_url":"https://github.com/CarolEidt","followers_url":"https://api.github.com/users/CarolEidt/followers","following_url":"https://api.github.com/users/CarolEidt/following{/other_user}","gists_url":"https://api.github.com/users/CarolEidt/gists{/gist_id}","starred_url":"https://api.github.com/users/CarolEidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarolEidt/subscriptions","organizations_url":"https://api.github.com/users/CarolEidt/orgs","repos_url":"https://api.github.com/users/CarolEidt/repos","events_url":"https://api.github.com/users/CarolEidt/events{/privacy}","received_events_url":"https://api.github.com/users/CarolEidt/received_events","type":"User","site_admin":false},"repo":{"id":31747006,"name":"coreclr","full_name":"CarolEidt/coreclr","owner":{"login":"CarolEidt","id":2973870,"avatar_url":"https://avatars.githubusercontent.com/u/2973870?v=3","gravatar_id":"","url":"https://api.github.com/users/CarolEidt","html_url":"https://github.com/CarolEidt","followers_url":"https://api.github.com/users/CarolEidt/followers","following_url":"https://api.github.com/users/CarolEidt/following{/other_user}","gists_url":"https://api.github.com/users/CarolEidt/gists{/gist_id}","starred_url":"https://api.github.com/users/CarolEidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarolEidt/subscriptions","organizations_url":"https://api.github.com/users/CarolEidt/orgs","repos_url":"https://api.github.com/users/CarolEidt/repos","events_url":"https://api.github.com/users/CarolEidt/events{/privacy}","received_events_url":"https://api.github.com/users/CarolEidt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CarolEidt/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":true,"url":"https://api.github.com/repos/CarolEidt/coreclr","forks_url":"https://api.github.com/repos/CarolEidt/coreclr/forks","keys_url":"https://api.github.com/repos/CarolEidt/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CarolEidt/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CarolEidt/coreclr/teams","hooks_url":"https://api.github.com/repos/CarolEidt/coreclr/hooks","issue_events_url":"https://api.github.com/repos/CarolEidt/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/CarolEidt/coreclr/events","assignees_url":"https://api.github.com/repos/CarolEidt/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/CarolEidt/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/CarolEidt/coreclr/tags","blobs_url":"https://api.github.com/repos/CarolEidt/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CarolEidt/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CarolEidt/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/CarolEidt/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CarolEidt/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/CarolEidt/coreclr/languages","stargazers_url":"https://api.github.com/repos/CarolEidt/coreclr/stargazers","contributors_url":"https://api.github.com/repos/CarolEidt/coreclr/contributors","subscribers_url":"https://api.github.com/repos/CarolEidt/coreclr/subscribers","subscription_url":"https://api.github.com/repos/CarolEidt/coreclr/subscription","commits_url":"https://api.github.com/repos/CarolEidt/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/CarolEidt/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/CarolEidt/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/CarolEidt/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/CarolEidt/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/CarolEidt/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CarolEidt/coreclr/merges","archive_url":"https://api.github.com/repos/CarolEidt/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CarolEidt/coreclr/downloads","issues_url":"https://api.github.com/repos/CarolEidt/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/CarolEidt/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/CarolEidt/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/CarolEidt/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CarolEidt/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/CarolEidt/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/CarolEidt/coreclr/deployments","created_at":"2015-03-06T01:49:09Z","updated_at":"2016-07-12T03:52:01Z","pushed_at":"2016-09-20T18:55:20Z","git_url":"git://github.com/CarolEidt/coreclr.git","ssh_url":"git@github.com:CarolEidt/coreclr.git","clone_url":"https://github.com/CarolEidt/coreclr.git","svn_url":"https://github.com/CarolEidt/coreclr","homepage":"","size":108321,"stargazers_count":2,"watchers_count":2,"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":2,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"53b124af8ab69316223f05d05fba30e069aa0503","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}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2016-09-20T20:06:54Z","pushed_at":"2016-09-20T20:56:39Z","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":"https://docs.microsoft.com/dotnet/","size":121709,"stargazers_count":6922,"watchers_count":6922,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1655,"mirror_url":null,"open_issues_count":984,"forks":1655,"open_issues":984,"watchers":6922,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7252"},"html":{"href":"https://github.com/dotnet/coreclr/pull/7252"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/7252"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/7252/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7252/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7252/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/c8b5850a1325423ab966d4f735b916756d311638"}}}}
{"actor":{"display_login":"CarolEidt"}}