{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/80542901","id":80542901,"diff_hunk":"@@ -1895,13 +1915,38 @@ void LowererMD::LegalizeSrc(IR::Instr *const instr, IR::Opnd *src, const uint fo\n             return;\n \n         case IR::OpndKindIntConst:\n-            Assert(!instr->isInlineeEntryInstr);\n-            if(forms & L_Imm32)\n+            if(forms & L_Ptr)\n             {\n                 return;\n             }\n+#ifdef _M_X64\n+            {\n+                IR::IntConstOpnd * intOpnd = src->AsIntConstOpnd();\n+                if ((forms & L_Imm32) && ((TySize[intOpnd->GetType()] != 8) ||\n+                    (!instr->isInlineeEntryInstr && Math::FitsInDWord(intOpnd->GetValue()))))\n+                {\n+                    // the constant fits in 32-bit, no need to hoist\n+                    return;\n+                }\n+                if (verify)\n+                {\n+                    AssertMsg(false, \"Missing legalization\");\n+                    return;\n+                }\n+                // The actual value for inlinee entry instr isn't determined until encoder\n+                // So it need to be hoisted conventionally.\n+                if (!instr->isInlineeEntryInstr)\n+                {\n+                    Assert(forms & L_Reg);\n+                    IR::IndirOpnd * indirOpnd = instr->m_func->GetTopFunc()->GetConstantAddressIndirOpnd(intOpnd->GetValue(), IR::AddrOpndKindConstantAddress, TyMachPtr, Js::OpCode::MOV);","path":"lib/Backend/LowerMDShared.cpp","position":65,"original_position":65,"commit_id":"dd9db5c68b1e020eed393e9ab421b76569aa42ca","original_commit_id":"dd9db5c68b1e020eed393e9ab421b76569aa42ca","user":{"login":"satheeshravi","id":2453412,"avatar_url":"https://avatars.githubusercontent.com/u/2453412?v=3","gravatar_id":"","url":"https://api.github.com/users/satheeshravi","html_url":"https://github.com/satheeshravi","followers_url":"https://api.github.com/users/satheeshravi/followers","following_url":"https://api.github.com/users/satheeshravi/following{/other_user}","gists_url":"https://api.github.com/users/satheeshravi/gists{/gist_id}","starred_url":"https://api.github.com/users/satheeshravi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satheeshravi/subscriptions","organizations_url":"https://api.github.com/users/satheeshravi/orgs","repos_url":"https://api.github.com/users/satheeshravi/repos","events_url":"https://api.github.com/users/satheeshravi/events{/privacy}","received_events_url":"https://api.github.com/users/satheeshravi/received_events","type":"User","site_admin":false},"body":">AddrOpndKindConstantAddress [](start = 130, length = 27)\r\n\r\nsame here.","created_at":"2016-09-26T18:37:56Z","updated_at":"2016-09-26T18:37:56Z","html_url":"https://github.com/Microsoft/ChakraCore/pull/1630#discussion_r80542901","pull_request_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments/80542901"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/1630#discussion_r80542901"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630","id":86444517,"html_url":"https://github.com/Microsoft/ChakraCore/pull/1630","diff_url":"https://github.com/Microsoft/ChakraCore/pull/1630.diff","patch_url":"https://github.com/Microsoft/ChakraCore/pull/1630.patch","issue_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1630","number":1630,"state":"open","locked":false,"title":"Replace AddrOpnd with IntConstOpnd for 64-bit immediates","user":{"login":"meg-gupta","id":20177294,"avatar_url":"https://avatars.githubusercontent.com/u/20177294?v=3","gravatar_id":"","url":"https://api.github.com/users/meg-gupta","html_url":"https://github.com/meg-gupta","followers_url":"https://api.github.com/users/meg-gupta/followers","following_url":"https://api.github.com/users/meg-gupta/following{/other_user}","gists_url":"https://api.github.com/users/meg-gupta/gists{/gist_id}","starred_url":"https://api.github.com/users/meg-gupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meg-gupta/subscriptions","organizations_url":"https://api.github.com/users/meg-gupta/orgs","repos_url":"https://api.github.com/users/meg-gupta/repos","events_url":"https://api.github.com/users/meg-gupta/events{/privacy}","received_events_url":"https://api.github.com/users/meg-gupta/received_events","type":"User","site_admin":false},"body":"AddrOpnd was used with AddrOpndKindConstant for 64bit immediates, and then\nlegalized. Replace all such uses with IntConstOpnd, and add code in\nlegalizer to handle them.\n","created_at":"2016-09-23T02:17:11Z","updated_at":"2016-09-26T18:37:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d348518a8b4907dc394445b231e1eb62be267f85","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630/commits","review_comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630/comments","review_comment_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1630/comments","statuses_url":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/dd9db5c68b1e020eed393e9ab421b76569aa42ca","head":{"label":"meg-gupta:newchangeimmop","ref":"newchangeimmop","sha":"dd9db5c68b1e020eed393e9ab421b76569aa42ca","user":{"login":"meg-gupta","id":20177294,"avatar_url":"https://avatars.githubusercontent.com/u/20177294?v=3","gravatar_id":"","url":"https://api.github.com/users/meg-gupta","html_url":"https://github.com/meg-gupta","followers_url":"https://api.github.com/users/meg-gupta/followers","following_url":"https://api.github.com/users/meg-gupta/following{/other_user}","gists_url":"https://api.github.com/users/meg-gupta/gists{/gist_id}","starred_url":"https://api.github.com/users/meg-gupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meg-gupta/subscriptions","organizations_url":"https://api.github.com/users/meg-gupta/orgs","repos_url":"https://api.github.com/users/meg-gupta/repos","events_url":"https://api.github.com/users/meg-gupta/events{/privacy}","received_events_url":"https://api.github.com/users/meg-gupta/received_events","type":"User","site_admin":false},"repo":{"id":62656648,"name":"ChakraCore","full_name":"meg-gupta/ChakraCore","owner":{"login":"meg-gupta","id":20177294,"avatar_url":"https://avatars.githubusercontent.com/u/20177294?v=3","gravatar_id":"","url":"https://api.github.com/users/meg-gupta","html_url":"https://github.com/meg-gupta","followers_url":"https://api.github.com/users/meg-gupta/followers","following_url":"https://api.github.com/users/meg-gupta/following{/other_user}","gists_url":"https://api.github.com/users/meg-gupta/gists{/gist_id}","starred_url":"https://api.github.com/users/meg-gupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meg-gupta/subscriptions","organizations_url":"https://api.github.com/users/meg-gupta/orgs","repos_url":"https://api.github.com/users/meg-gupta/repos","events_url":"https://api.github.com/users/meg-gupta/events{/privacy}","received_events_url":"https://api.github.com/users/meg-gupta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/meg-gupta/ChakraCore","description":"ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge","fork":true,"url":"https://api.github.com/repos/meg-gupta/ChakraCore","forks_url":"https://api.github.com/repos/meg-gupta/ChakraCore/forks","keys_url":"https://api.github.com/repos/meg-gupta/ChakraCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meg-gupta/ChakraCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meg-gupta/ChakraCore/teams","hooks_url":"https://api.github.com/repos/meg-gupta/ChakraCore/hooks","issue_events_url":"https://api.github.com/repos/meg-gupta/ChakraCore/issues/events{/number}","events_url":"https://api.github.com/repos/meg-gupta/ChakraCore/events","assignees_url":"https://api.github.com/repos/meg-gupta/ChakraCore/assignees{/user}","branches_url":"https://api.github.com/repos/meg-gupta/ChakraCore/branches{/branch}","tags_url":"https://api.github.com/repos/meg-gupta/ChakraCore/tags","blobs_url":"https://api.github.com/repos/meg-gupta/ChakraCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meg-gupta/ChakraCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meg-gupta/ChakraCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/meg-gupta/ChakraCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meg-gupta/ChakraCore/statuses/{sha}","languages_url":"https://api.github.com/repos/meg-gupta/ChakraCore/languages","stargazers_url":"https://api.github.com/repos/meg-gupta/ChakraCore/stargazers","contributors_url":"https://api.github.com/repos/meg-gupta/ChakraCore/contributors","subscribers_url":"https://api.github.com/repos/meg-gupta/ChakraCore/subscribers","subscription_url":"https://api.github.com/repos/meg-gupta/ChakraCore/subscription","commits_url":"https://api.github.com/repos/meg-gupta/ChakraCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/meg-gupta/ChakraCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/meg-gupta/ChakraCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/meg-gupta/ChakraCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/meg-gupta/ChakraCore/contents/{+path}","compare_url":"https://api.github.com/repos/meg-gupta/ChakraCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meg-gupta/ChakraCore/merges","archive_url":"https://api.github.com/repos/meg-gupta/ChakraCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meg-gupta/ChakraCore/downloads","issues_url":"https://api.github.com/repos/meg-gupta/ChakraCore/issues{/number}","pulls_url":"https://api.github.com/repos/meg-gupta/ChakraCore/pulls{/number}","milestones_url":"https://api.github.com/repos/meg-gupta/ChakraCore/milestones{/number}","notifications_url":"https://api.github.com/repos/meg-gupta/ChakraCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meg-gupta/ChakraCore/labels{/name}","releases_url":"https://api.github.com/repos/meg-gupta/ChakraCore/releases{/id}","deployments_url":"https://api.github.com/repos/meg-gupta/ChakraCore/deployments","created_at":"2016-07-05T17:36:15Z","updated_at":"2016-07-05T17:36:35Z","pushed_at":"2016-09-26T18:32:10Z","git_url":"git://github.com/meg-gupta/ChakraCore.git","ssh_url":"git@github.com:meg-gupta/ChakraCore.git","clone_url":"https://github.com/meg-gupta/ChakraCore.git","svn_url":"https://github.com/meg-gupta/ChakraCore","homepage":null,"size":41586,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"Microsoft:master","ref":"master","sha":"fcd7f6d4c29ecbba60a7bf84c703d9aa110ec596","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":49086513,"name":"ChakraCore","full_name":"Microsoft/ChakraCore","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/ChakraCore","description":"ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge","fork":false,"url":"https://api.github.com/repos/Microsoft/ChakraCore","forks_url":"https://api.github.com/repos/Microsoft/ChakraCore/forks","keys_url":"https://api.github.com/repos/Microsoft/ChakraCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/ChakraCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/ChakraCore/teams","hooks_url":"https://api.github.com/repos/Microsoft/ChakraCore/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/ChakraCore/events","assignees_url":"https://api.github.com/repos/Microsoft/ChakraCore/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/ChakraCore/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/ChakraCore/tags","blobs_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/ChakraCore/languages","stargazers_url":"https://api.github.com/repos/Microsoft/ChakraCore/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/ChakraCore/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/ChakraCore/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/ChakraCore/subscription","commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/ChakraCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/ChakraCore/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/ChakraCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/ChakraCore/merges","archive_url":"https://api.github.com/repos/Microsoft/ChakraCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/ChakraCore/downloads","issues_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/ChakraCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/ChakraCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/ChakraCore/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/ChakraCore/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/ChakraCore/deployments","created_at":"2016-01-05T19:05:31Z","updated_at":"2016-09-26T11:05:05Z","pushed_at":"2016-09-26T18:37:26Z","git_url":"git://github.com/Microsoft/ChakraCore.git","ssh_url":"git@github.com:Microsoft/ChakraCore.git","clone_url":"https://github.com/Microsoft/ChakraCore.git","svn_url":"https://github.com/Microsoft/ChakraCore","homepage":null,"size":52791,"stargazers_count":5660,"watchers_count":5660,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":630,"mirror_url":null,"open_issues_count":171,"forks":630,"open_issues":171,"watchers":5660,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630"},"html":{"href":"https://github.com/Microsoft/ChakraCore/pull/1630"},"issue":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1630"},"comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/issues/1630/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/1630/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/ChakraCore/statuses/dd9db5c68b1e020eed393e9ab421b76569aa42ca"}}}}
{"actor":{"display_login":"satheeshravi"}}