{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/hhvm/pulls/comments/82832163","pull_request_review_id":3711578,"id":82832163,"diff_hunk":"@@ -47,57 +45,31 @@ PhysRegSaver::PhysRegSaver(Vout& v, RegSet regs)\n     });\n   }\n \n-  switch (arch()) {\n-    case Arch::X64:\n-    case Arch::PPC64:\n-      gpr.forEach([&] (PhysReg r) {\n-        v << push{r};\n-      });\n-      break;\n-    case Arch::ARM:\n-      gpr.forEachPair([&] (PhysReg r0, PhysReg r1) {\n-        if (r1 == InvalidReg) {\n-          v << push{r0};\n-        } else {\n-          v << pushp{r1, r0};\n-        }\n-      });\n-      break;\n-  }\n-\n-  if (m_adjust) {\n-    v << lea{sp[-m_adjust], sp};\n-  }\n+  gpr.forEachPair([&] (PhysReg r0, PhysReg r1) {\n+    // Push r0 twice to avoid vasm-check failures\n+    if (r1 == InvalidReg) {\n+      v << pushp{r0, r0};\n+    } else {\n+      v << pushp{r1, r0};\n+    }\n+  });\n }\n \n PhysRegSaver::~PhysRegSaver() {\n   auto& v = m_v;\n   auto const sp = rsp();\n \n-  if (m_adjust) {\n-    v << lea{sp[m_adjust], sp};\n-  }\n-\n   auto gpr = m_regs & abi().gp();\n   auto xmm = m_regs & abi().simd();\n \n-  switch (arch()) {\n-    case Arch::X64:\n-    case Arch::PPC64:\n-      gpr.forEachR([&] (PhysReg r) {\n-        v << pop{r};\n-      });\n-      break;\n-    case Arch::ARM:\n-      gpr.forEachPairR([&] (PhysReg r0, PhysReg r1) {\n-        if (r1 == InvalidReg) {\n-          v << pop{r0};\n-        } else {\n-          v << popp{r0, r1};\n-        }\n-      });\n-      break;\n-  }\n+  gpr.forEachPairR([&] (PhysReg r0, PhysReg r1) {\n+    // Pop second value into new virtual to avoid vasm-check failures","path":"hphp/runtime/vm/jit/phys-reg-saver.cpp","position":73,"original_position":73,"commit_id":"7d6819b484f04e449022d593f851f6bb69755153","original_commit_id":"1c1223241122ec51342f00ede2b575c372065053","user":{"login":"mxw","id":1013739,"avatar_url":"https://avatars.githubusercontent.com/u/1013739?v=3","gravatar_id":"","url":"https://api.github.com/users/mxw","html_url":"https://github.com/mxw","followers_url":"https://api.github.com/users/mxw/followers","following_url":"https://api.github.com/users/mxw/following{/other_user}","gists_url":"https://api.github.com/users/mxw/gists{/gist_id}","starred_url":"https://api.github.com/users/mxw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxw/subscriptions","organizations_url":"https://api.github.com/users/mxw/orgs","repos_url":"https://api.github.com/users/mxw/repos","events_url":"https://api.github.com/users/mxw/events{/privacy}","received_events_url":"https://api.github.com/users/mxw/received_events","type":"User","site_admin":false},"body":"Move this comment down below the `if (...) {`.","created_at":"2016-10-11T16:23:16Z","updated_at":"2016-10-11T16:23:48Z","html_url":"https://github.com/facebook/hhvm/pull/7392#discussion_r82832163","pull_request_url":"https://api.github.com/repos/facebook/hhvm/pulls/7392","_links":{"self":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/comments/82832163"},"html":{"href":"https://github.com/facebook/hhvm/pull/7392#discussion_r82832163"},"pull_request":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/7392"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/hhvm/pulls/7392","id":87158387,"html_url":"https://github.com/facebook/hhvm/pull/7392","diff_url":"https://github.com/facebook/hhvm/pull/7392.diff","patch_url":"https://github.com/facebook/hhvm/pull/7392.patch","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/7392","number":7392,"state":"open","locked":false,"title":"[AArch64] Rework push/pop to avoid 8-byte operation.","user":{"login":"dave-estes","id":15822880,"avatar_url":"https://avatars.githubusercontent.com/u/15822880?v=3","gravatar_id":"","url":"https://api.github.com/users/dave-estes","html_url":"https://github.com/dave-estes","followers_url":"https://api.github.com/users/dave-estes/followers","following_url":"https://api.github.com/users/dave-estes/following{/other_user}","gists_url":"https://api.github.com/users/dave-estes/gists{/gist_id}","starred_url":"https://api.github.com/users/dave-estes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave-estes/subscriptions","organizations_url":"https://api.github.com/users/dave-estes/orgs","repos_url":"https://api.github.com/users/dave-estes/repos","events_url":"https://api.github.com/users/dave-estes/events{/privacy}","received_events_url":"https://api.github.com/users/dave-estes/received_events","type":"User","site_admin":false},"body":"In addition to requiring 16 byte sp alignment at ABI boundaries,\r\nAArch64 also requires 16 byte alignment on loads/stores. Currently,\r\ntheres a workaround in vasm-arm.cpp to temporarily use rAsm for\r\n8 bytes pushes/pops. This change removes that workaround and instead\r\nadds support to specify a sp operation alignment per platform which\r\nis used wherever offsets calculations are done for pushes/pops.","created_at":"2016-09-28T16:50:57Z","updated_at":"2016-10-11T16:40:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f90bc68f936957c41d101b6e40b89225b3cef59c","assignee":{"login":"mxw","id":1013739,"avatar_url":"https://avatars.githubusercontent.com/u/1013739?v=3","gravatar_id":"","url":"https://api.github.com/users/mxw","html_url":"https://github.com/mxw","followers_url":"https://api.github.com/users/mxw/followers","following_url":"https://api.github.com/users/mxw/following{/other_user}","gists_url":"https://api.github.com/users/mxw/gists{/gist_id}","starred_url":"https://api.github.com/users/mxw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxw/subscriptions","organizations_url":"https://api.github.com/users/mxw/orgs","repos_url":"https://api.github.com/users/mxw/repos","events_url":"https://api.github.com/users/mxw/events{/privacy}","received_events_url":"https://api.github.com/users/mxw/received_events","type":"User","site_admin":false},"assignees":[{"login":"mxw","id":1013739,"avatar_url":"https://avatars.githubusercontent.com/u/1013739?v=3","gravatar_id":"","url":"https://api.github.com/users/mxw","html_url":"https://github.com/mxw","followers_url":"https://api.github.com/users/mxw/followers","following_url":"https://api.github.com/users/mxw/following{/other_user}","gists_url":"https://api.github.com/users/mxw/gists{/gist_id}","starred_url":"https://api.github.com/users/mxw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxw/subscriptions","organizations_url":"https://api.github.com/users/mxw/orgs","repos_url":"https://api.github.com/users/mxw/repos","events_url":"https://api.github.com/users/mxw/events{/privacy}","received_events_url":"https://api.github.com/users/mxw/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/hhvm/pulls/7392/commits","review_comments_url":"https://api.github.com/repos/facebook/hhvm/pulls/7392/comments","review_comment_url":"https://api.github.com/repos/facebook/hhvm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/7392/comments","statuses_url":"https://api.github.com/repos/facebook/hhvm/statuses/7d6819b484f04e449022d593f851f6bb69755153","head":{"label":"dave-estes:0016-aarch64-push-pop-alignment","ref":"0016-aarch64-push-pop-alignment","sha":"7d6819b484f04e449022d593f851f6bb69755153","user":{"login":"dave-estes","id":15822880,"avatar_url":"https://avatars.githubusercontent.com/u/15822880?v=3","gravatar_id":"","url":"https://api.github.com/users/dave-estes","html_url":"https://github.com/dave-estes","followers_url":"https://api.github.com/users/dave-estes/followers","following_url":"https://api.github.com/users/dave-estes/following{/other_user}","gists_url":"https://api.github.com/users/dave-estes/gists{/gist_id}","starred_url":"https://api.github.com/users/dave-estes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave-estes/subscriptions","organizations_url":"https://api.github.com/users/dave-estes/orgs","repos_url":"https://api.github.com/users/dave-estes/repos","events_url":"https://api.github.com/users/dave-estes/events{/privacy}","received_events_url":"https://api.github.com/users/dave-estes/received_events","type":"User","site_admin":false},"repo":{"id":46225396,"name":"hhvm","full_name":"dave-estes/hhvm","owner":{"login":"dave-estes","id":15822880,"avatar_url":"https://avatars.githubusercontent.com/u/15822880?v=3","gravatar_id":"","url":"https://api.github.com/users/dave-estes","html_url":"https://github.com/dave-estes","followers_url":"https://api.github.com/users/dave-estes/followers","following_url":"https://api.github.com/users/dave-estes/following{/other_user}","gists_url":"https://api.github.com/users/dave-estes/gists{/gist_id}","starred_url":"https://api.github.com/users/dave-estes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave-estes/subscriptions","organizations_url":"https://api.github.com/users/dave-estes/orgs","repos_url":"https://api.github.com/users/dave-estes/repos","events_url":"https://api.github.com/users/dave-estes/events{/privacy}","received_events_url":"https://api.github.com/users/dave-estes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dave-estes/hhvm","description":"A virtual machine designed for executing programs written in Hack and PHP. ","fork":true,"url":"https://api.github.com/repos/dave-estes/hhvm","forks_url":"https://api.github.com/repos/dave-estes/hhvm/forks","keys_url":"https://api.github.com/repos/dave-estes/hhvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dave-estes/hhvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dave-estes/hhvm/teams","hooks_url":"https://api.github.com/repos/dave-estes/hhvm/hooks","issue_events_url":"https://api.github.com/repos/dave-estes/hhvm/issues/events{/number}","events_url":"https://api.github.com/repos/dave-estes/hhvm/events","assignees_url":"https://api.github.com/repos/dave-estes/hhvm/assignees{/user}","branches_url":"https://api.github.com/repos/dave-estes/hhvm/branches{/branch}","tags_url":"https://api.github.com/repos/dave-estes/hhvm/tags","blobs_url":"https://api.github.com/repos/dave-estes/hhvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dave-estes/hhvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dave-estes/hhvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/dave-estes/hhvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dave-estes/hhvm/statuses/{sha}","languages_url":"https://api.github.com/repos/dave-estes/hhvm/languages","stargazers_url":"https://api.github.com/repos/dave-estes/hhvm/stargazers","contributors_url":"https://api.github.com/repos/dave-estes/hhvm/contributors","subscribers_url":"https://api.github.com/repos/dave-estes/hhvm/subscribers","subscription_url":"https://api.github.com/repos/dave-estes/hhvm/subscription","commits_url":"https://api.github.com/repos/dave-estes/hhvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/dave-estes/hhvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/dave-estes/hhvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/dave-estes/hhvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/dave-estes/hhvm/contents/{+path}","compare_url":"https://api.github.com/repos/dave-estes/hhvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dave-estes/hhvm/merges","archive_url":"https://api.github.com/repos/dave-estes/hhvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dave-estes/hhvm/downloads","issues_url":"https://api.github.com/repos/dave-estes/hhvm/issues{/number}","pulls_url":"https://api.github.com/repos/dave-estes/hhvm/pulls{/number}","milestones_url":"https://api.github.com/repos/dave-estes/hhvm/milestones{/number}","notifications_url":"https://api.github.com/repos/dave-estes/hhvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dave-estes/hhvm/labels{/name}","releases_url":"https://api.github.com/repos/dave-estes/hhvm/releases{/id}","deployments_url":"https://api.github.com/repos/dave-estes/hhvm/deployments","created_at":"2015-11-15T16:20:05Z","updated_at":"2016-09-02T19:03:45Z","pushed_at":"2016-10-11T16:24:37Z","git_url":"git://github.com/dave-estes/hhvm.git","ssh_url":"git@github.com:dave-estes/hhvm.git","clone_url":"https://github.com/dave-estes/hhvm.git","svn_url":"https://github.com/dave-estes/hhvm","homepage":"http://hhvm.com","size":242960,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"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":"facebook:master","ref":"master","sha":"201cf78bdb5247cbd99b53a49dffdca2f39f1e09","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":455600,"name":"hhvm","full_name":"facebook/hhvm","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/hhvm","description":"A virtual machine designed for executing programs written in Hack and PHP. ","fork":false,"url":"https://api.github.com/repos/facebook/hhvm","forks_url":"https://api.github.com/repos/facebook/hhvm/forks","keys_url":"https://api.github.com/repos/facebook/hhvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/hhvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/hhvm/teams","hooks_url":"https://api.github.com/repos/facebook/hhvm/hooks","issue_events_url":"https://api.github.com/repos/facebook/hhvm/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/hhvm/events","assignees_url":"https://api.github.com/repos/facebook/hhvm/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/hhvm/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/hhvm/tags","blobs_url":"https://api.github.com/repos/facebook/hhvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/hhvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/hhvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/hhvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/hhvm/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/hhvm/languages","stargazers_url":"https://api.github.com/repos/facebook/hhvm/stargazers","contributors_url":"https://api.github.com/repos/facebook/hhvm/contributors","subscribers_url":"https://api.github.com/repos/facebook/hhvm/subscribers","subscription_url":"https://api.github.com/repos/facebook/hhvm/subscription","commits_url":"https://api.github.com/repos/facebook/hhvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/hhvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/hhvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/hhvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/hhvm/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/hhvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/hhvm/merges","archive_url":"https://api.github.com/repos/facebook/hhvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/hhvm/downloads","issues_url":"https://api.github.com/repos/facebook/hhvm/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/hhvm/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/hhvm/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/hhvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/hhvm/labels{/name}","releases_url":"https://api.github.com/repos/facebook/hhvm/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/hhvm/deployments","created_at":"2010-01-02T01:17:06Z","updated_at":"2016-10-11T16:09:03Z","pushed_at":"2016-10-11T16:23:48Z","git_url":"git://github.com/facebook/hhvm.git","ssh_url":"git@github.com:facebook/hhvm.git","clone_url":"https://github.com/facebook/hhvm.git","svn_url":"https://github.com/facebook/hhvm","homepage":"http://hhvm.com","size":299536,"stargazers_count":13967,"watchers_count":13967,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2567,"mirror_url":null,"open_issues_count":618,"forks":2567,"open_issues":618,"watchers":13967,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/7392"},"html":{"href":"https://github.com/facebook/hhvm/pull/7392"},"issue":{"href":"https://api.github.com/repos/facebook/hhvm/issues/7392"},"comments":{"href":"https://api.github.com/repos/facebook/hhvm/issues/7392/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/7392/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/7392/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/hhvm/statuses/7d6819b484f04e449022d593f851f6bb69755153"}}}}
{"actor":{"display_login":"mxw"}}