{"action":"created","comment":{"url":"https://api.github.com/repos/MerryMage/dynarmic/pulls/comments/93140458","pull_request_review_id":13662614,"id":93140458,"diff_hunk":"@@ -1671,6 +2001,57 @@ void EmitX64::EmitPackedSaturatedSubS16(IR::Block&, IR::Inst* inst) {\n     EmitPackedOperation(code, reg_alloc, inst, &Xbyak::CodeGenerator::psubsw);\n }\n \n+void EmitX64::EmitPackedAbsDiffSumS8(IR::Block&, IR::Inst* inst) {\n+    EmitPackedOperation(code, reg_alloc, inst, &Xbyak::CodeGenerator::psadbw);\n+}\n+\n+void EmitX64::EmitPackedNegate8(IR::Block&, IR::Inst* inst) {\n+    IR::Value a = inst->GetArg(0);\n+\n+    Xbyak::Reg32 result = reg_alloc.UseDefGpr(a, inst).cvt32();\n+    Xbyak::Reg32 tmp = reg_alloc.ScratchGpr().cvt32();\n+\n+    Xbyak::Xmm xmm_a = reg_alloc.ScratchXmm();\n+    Xbyak::Xmm xmm_b = reg_alloc.ScratchXmm();\n+\n+    if (cpu_info.has(Xbyak::util::Cpu::tSSSE3)) {\n+        code->movd(xmm_a, result);\n+        code->mov(tmp,0xFFFFFFFF);\n+        code->movd(xmm_b, tmp);\n+        code->psignb(xmm_a,xmm_b);\n+        code->movd(result,xmm_a);\n+        return;\n+    }\n+    code->mov(tmp,0xFFFFFFFF);\n+    code->movd(xmm_a, result);\n+    code->movd(xmm_b, tmp);\n+    code->pxor(xmm_a,xmm_b);\n+    code->paddb(xmm_a,xmm_b);","path":"src/backend_x64/emit_x64.cpp","position":411,"original_position":411,"commit_id":"4dd0f5bd002e58ac2bcafc81b2da3c7e1c5354b9","original_commit_id":"4dd0f5bd002e58ac2bcafc81b2da3c7e1c5354b9","user":{"login":"MerryMage","id":8682882,"avatar_url":"https://avatars.githubusercontent.com/u/8682882?v=3","gravatar_id":"","url":"https://api.github.com/users/MerryMage","html_url":"https://github.com/MerryMage","followers_url":"https://api.github.com/users/MerryMage/followers","following_url":"https://api.github.com/users/MerryMage/following{/other_user}","gists_url":"https://api.github.com/users/MerryMage/gists{/gist_id}","starred_url":"https://api.github.com/users/MerryMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MerryMage/subscriptions","organizations_url":"https://api.github.com/users/MerryMage/orgs","repos_url":"https://api.github.com/users/MerryMage/repos","events_url":"https://api.github.com/users/MerryMage/events{/privacy}","received_events_url":"https://api.github.com/users/MerryMage/received_events","type":"User","site_admin":false},"body":"No. This calculates `(~a + 0xFFFF) & 0xFFFF` for each packed byte, which is not the two's complement. The two's complement would be `(~a + 1) & 0xFFFF`. \r\n\r\nYou could chose to implement this as `(~a - 0xFFFF) & 0xFFFF` in order to reuse the constant. i.e.: replace `paddb` with `psubb`.","created_at":"2016-12-19T23:11:40Z","updated_at":"2016-12-19T23:11:40Z","html_url":"https://github.com/MerryMage/dynarmic/pull/66#discussion_r93140458","pull_request_url":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/MerryMage/dynarmic/pulls/comments/93140458"},"html":{"href":"https://github.com/MerryMage/dynarmic/pull/66#discussion_r93140458"},"pull_request":{"href":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66","id":98523680,"html_url":"https://github.com/MerryMage/dynarmic/pull/66","diff_url":"https://github.com/MerryMage/dynarmic/pull/66.diff","patch_url":"https://github.com/MerryMage/dynarmic/pull/66.patch","issue_url":"https://api.github.com/repos/MerryMage/dynarmic/issues/66","number":66,"state":"open","locked":false,"title":"Implemented SADD8, UADD16, SADD16, SSAX, SASX","user":{"login":"FernandoS27","id":1731197,"avatar_url":"https://avatars.githubusercontent.com/u/1731197?v=3","gravatar_id":"","url":"https://api.github.com/users/FernandoS27","html_url":"https://github.com/FernandoS27","followers_url":"https://api.github.com/users/FernandoS27/followers","following_url":"https://api.github.com/users/FernandoS27/following{/other_user}","gists_url":"https://api.github.com/users/FernandoS27/gists{/gist_id}","starred_url":"https://api.github.com/users/FernandoS27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FernandoS27/subscriptions","organizations_url":"https://api.github.com/users/FernandoS27/orgs","repos_url":"https://api.github.com/users/FernandoS27/repos","events_url":"https://api.github.com/users/FernandoS27/events{/privacy}","received_events_url":"https://api.github.com/users/FernandoS27/received_events","type":"User","site_admin":false},"body":"Added and tested SADD8, UADD16, SADD16, SSAX, SASX.\r\n\r\nAlso had some failed attempts to implement SSUB8, SSUB16, USUB8 and USUB16. Their implementations are included for review but are disabled.\r\n\r\nUSUB8 is a particular case that needs review. It uses SWAR arithmetics but mismatches the interpreter on a single value by 1.\r\n\r\nI've tried multiple techniques to replicate the ARM's behavior but all seem to fail. I tried calculating two's complement of second operand and use the corresponding add instruction but this does not work for unsigned instructions.\r\n\r\nFeel free to review.","created_at":"2016-12-19T08:24:23Z","updated_at":"2016-12-19T23:11:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0397c47542f592fac419fef5e8dccdb9929fa056","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66/commits","review_comments_url":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66/comments","review_comment_url":"https://api.github.com/repos/MerryMage/dynarmic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MerryMage/dynarmic/issues/66/comments","statuses_url":"https://api.github.com/repos/MerryMage/dynarmic/statuses/4dd0f5bd002e58ac2bcafc81b2da3c7e1c5354b9","head":{"label":"FernandoS27:parallel_instructions","ref":"parallel_instructions","sha":"4dd0f5bd002e58ac2bcafc81b2da3c7e1c5354b9","user":{"login":"FernandoS27","id":1731197,"avatar_url":"https://avatars.githubusercontent.com/u/1731197?v=3","gravatar_id":"","url":"https://api.github.com/users/FernandoS27","html_url":"https://github.com/FernandoS27","followers_url":"https://api.github.com/users/FernandoS27/followers","following_url":"https://api.github.com/users/FernandoS27/following{/other_user}","gists_url":"https://api.github.com/users/FernandoS27/gists{/gist_id}","starred_url":"https://api.github.com/users/FernandoS27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FernandoS27/subscriptions","organizations_url":"https://api.github.com/users/FernandoS27/orgs","repos_url":"https://api.github.com/users/FernandoS27/repos","events_url":"https://api.github.com/users/FernandoS27/events{/privacy}","received_events_url":"https://api.github.com/users/FernandoS27/received_events","type":"User","site_admin":false},"repo":{"id":76219248,"name":"dynarmic","full_name":"FernandoS27/dynarmic","owner":{"login":"FernandoS27","id":1731197,"avatar_url":"https://avatars.githubusercontent.com/u/1731197?v=3","gravatar_id":"","url":"https://api.github.com/users/FernandoS27","html_url":"https://github.com/FernandoS27","followers_url":"https://api.github.com/users/FernandoS27/followers","following_url":"https://api.github.com/users/FernandoS27/following{/other_user}","gists_url":"https://api.github.com/users/FernandoS27/gists{/gist_id}","starred_url":"https://api.github.com/users/FernandoS27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FernandoS27/subscriptions","organizations_url":"https://api.github.com/users/FernandoS27/orgs","repos_url":"https://api.github.com/users/FernandoS27/repos","events_url":"https://api.github.com/users/FernandoS27/events{/privacy}","received_events_url":"https://api.github.com/users/FernandoS27/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FernandoS27/dynarmic","description":"An ARM dynamic recompiler.","fork":true,"url":"https://api.github.com/repos/FernandoS27/dynarmic","forks_url":"https://api.github.com/repos/FernandoS27/dynarmic/forks","keys_url":"https://api.github.com/repos/FernandoS27/dynarmic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FernandoS27/dynarmic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FernandoS27/dynarmic/teams","hooks_url":"https://api.github.com/repos/FernandoS27/dynarmic/hooks","issue_events_url":"https://api.github.com/repos/FernandoS27/dynarmic/issues/events{/number}","events_url":"https://api.github.com/repos/FernandoS27/dynarmic/events","assignees_url":"https://api.github.com/repos/FernandoS27/dynarmic/assignees{/user}","branches_url":"https://api.github.com/repos/FernandoS27/dynarmic/branches{/branch}","tags_url":"https://api.github.com/repos/FernandoS27/dynarmic/tags","blobs_url":"https://api.github.com/repos/FernandoS27/dynarmic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FernandoS27/dynarmic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FernandoS27/dynarmic/git/refs{/sha}","trees_url":"https://api.github.com/repos/FernandoS27/dynarmic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FernandoS27/dynarmic/statuses/{sha}","languages_url":"https://api.github.com/repos/FernandoS27/dynarmic/languages","stargazers_url":"https://api.github.com/repos/FernandoS27/dynarmic/stargazers","contributors_url":"https://api.github.com/repos/FernandoS27/dynarmic/contributors","subscribers_url":"https://api.github.com/repos/FernandoS27/dynarmic/subscribers","subscription_url":"https://api.github.com/repos/FernandoS27/dynarmic/subscription","commits_url":"https://api.github.com/repos/FernandoS27/dynarmic/commits{/sha}","git_commits_url":"https://api.github.com/repos/FernandoS27/dynarmic/git/commits{/sha}","comments_url":"https://api.github.com/repos/FernandoS27/dynarmic/comments{/number}","issue_comment_url":"https://api.github.com/repos/FernandoS27/dynarmic/issues/comments{/number}","contents_url":"https://api.github.com/repos/FernandoS27/dynarmic/contents/{+path}","compare_url":"https://api.github.com/repos/FernandoS27/dynarmic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FernandoS27/dynarmic/merges","archive_url":"https://api.github.com/repos/FernandoS27/dynarmic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FernandoS27/dynarmic/downloads","issues_url":"https://api.github.com/repos/FernandoS27/dynarmic/issues{/number}","pulls_url":"https://api.github.com/repos/FernandoS27/dynarmic/pulls{/number}","milestones_url":"https://api.github.com/repos/FernandoS27/dynarmic/milestones{/number}","notifications_url":"https://api.github.com/repos/FernandoS27/dynarmic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FernandoS27/dynarmic/labels{/name}","releases_url":"https://api.github.com/repos/FernandoS27/dynarmic/releases{/id}","deployments_url":"https://api.github.com/repos/FernandoS27/dynarmic/deployments","created_at":"2016-12-12T03:34:44Z","updated_at":"2016-12-12T03:34:45Z","pushed_at":"2016-12-19T15:11:53Z","git_url":"git://github.com/FernandoS27/dynarmic.git","ssh_url":"git@github.com:FernandoS27/dynarmic.git","clone_url":"https://github.com/FernandoS27/dynarmic.git","svn_url":"https://github.com/FernandoS27/dynarmic","homepage":null,"size":986,"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":"MerryMage:master","ref":"master","sha":"59aeed0b701378a8a784f9fbdcc94380e32417b0","user":{"login":"MerryMage","id":8682882,"avatar_url":"https://avatars.githubusercontent.com/u/8682882?v=3","gravatar_id":"","url":"https://api.github.com/users/MerryMage","html_url":"https://github.com/MerryMage","followers_url":"https://api.github.com/users/MerryMage/followers","following_url":"https://api.github.com/users/MerryMage/following{/other_user}","gists_url":"https://api.github.com/users/MerryMage/gists{/gist_id}","starred_url":"https://api.github.com/users/MerryMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MerryMage/subscriptions","organizations_url":"https://api.github.com/users/MerryMage/orgs","repos_url":"https://api.github.com/users/MerryMage/repos","events_url":"https://api.github.com/users/MerryMage/events{/privacy}","received_events_url":"https://api.github.com/users/MerryMage/received_events","type":"User","site_admin":false},"repo":{"id":67070359,"name":"dynarmic","full_name":"MerryMage/dynarmic","owner":{"login":"MerryMage","id":8682882,"avatar_url":"https://avatars.githubusercontent.com/u/8682882?v=3","gravatar_id":"","url":"https://api.github.com/users/MerryMage","html_url":"https://github.com/MerryMage","followers_url":"https://api.github.com/users/MerryMage/followers","following_url":"https://api.github.com/users/MerryMage/following{/other_user}","gists_url":"https://api.github.com/users/MerryMage/gists{/gist_id}","starred_url":"https://api.github.com/users/MerryMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MerryMage/subscriptions","organizations_url":"https://api.github.com/users/MerryMage/orgs","repos_url":"https://api.github.com/users/MerryMage/repos","events_url":"https://api.github.com/users/MerryMage/events{/privacy}","received_events_url":"https://api.github.com/users/MerryMage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MerryMage/dynarmic","description":"An ARM dynamic recompiler.","fork":false,"url":"https://api.github.com/repos/MerryMage/dynarmic","forks_url":"https://api.github.com/repos/MerryMage/dynarmic/forks","keys_url":"https://api.github.com/repos/MerryMage/dynarmic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MerryMage/dynarmic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MerryMage/dynarmic/teams","hooks_url":"https://api.github.com/repos/MerryMage/dynarmic/hooks","issue_events_url":"https://api.github.com/repos/MerryMage/dynarmic/issues/events{/number}","events_url":"https://api.github.com/repos/MerryMage/dynarmic/events","assignees_url":"https://api.github.com/repos/MerryMage/dynarmic/assignees{/user}","branches_url":"https://api.github.com/repos/MerryMage/dynarmic/branches{/branch}","tags_url":"https://api.github.com/repos/MerryMage/dynarmic/tags","blobs_url":"https://api.github.com/repos/MerryMage/dynarmic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MerryMage/dynarmic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MerryMage/dynarmic/git/refs{/sha}","trees_url":"https://api.github.com/repos/MerryMage/dynarmic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MerryMage/dynarmic/statuses/{sha}","languages_url":"https://api.github.com/repos/MerryMage/dynarmic/languages","stargazers_url":"https://api.github.com/repos/MerryMage/dynarmic/stargazers","contributors_url":"https://api.github.com/repos/MerryMage/dynarmic/contributors","subscribers_url":"https://api.github.com/repos/MerryMage/dynarmic/subscribers","subscription_url":"https://api.github.com/repos/MerryMage/dynarmic/subscription","commits_url":"https://api.github.com/repos/MerryMage/dynarmic/commits{/sha}","git_commits_url":"https://api.github.com/repos/MerryMage/dynarmic/git/commits{/sha}","comments_url":"https://api.github.com/repos/MerryMage/dynarmic/comments{/number}","issue_comment_url":"https://api.github.com/repos/MerryMage/dynarmic/issues/comments{/number}","contents_url":"https://api.github.com/repos/MerryMage/dynarmic/contents/{+path}","compare_url":"https://api.github.com/repos/MerryMage/dynarmic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MerryMage/dynarmic/merges","archive_url":"https://api.github.com/repos/MerryMage/dynarmic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MerryMage/dynarmic/downloads","issues_url":"https://api.github.com/repos/MerryMage/dynarmic/issues{/number}","pulls_url":"https://api.github.com/repos/MerryMage/dynarmic/pulls{/number}","milestones_url":"https://api.github.com/repos/MerryMage/dynarmic/milestones{/number}","notifications_url":"https://api.github.com/repos/MerryMage/dynarmic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MerryMage/dynarmic/labels{/name}","releases_url":"https://api.github.com/repos/MerryMage/dynarmic/releases{/id}","deployments_url":"https://api.github.com/repos/MerryMage/dynarmic/deployments","created_at":"2016-08-31T20:15:26Z","updated_at":"2016-12-18T22:29:43Z","pushed_at":"2016-12-19T22:04:58Z","git_url":"git://github.com/MerryMage/dynarmic.git","ssh_url":"git@github.com:MerryMage/dynarmic.git","clone_url":"https://github.com/MerryMage/dynarmic.git","svn_url":"https://github.com/MerryMage/dynarmic","homepage":null,"size":880,"stargazers_count":36,"watchers_count":36,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":10,"forks":9,"open_issues":10,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66"},"html":{"href":"https://github.com/MerryMage/dynarmic/pull/66"},"issue":{"href":"https://api.github.com/repos/MerryMage/dynarmic/issues/66"},"comments":{"href":"https://api.github.com/repos/MerryMage/dynarmic/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/MerryMage/dynarmic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MerryMage/dynarmic/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/MerryMage/dynarmic/statuses/4dd0f5bd002e58ac2bcafc81b2da3c7e1c5354b9"}}}}
{"actor":{"display_login":"MerryMage"}}