{"action":"created","comment":{"url":"https://api.github.com/repos/marco9999/orbum/pulls/comments/209427788","pull_request_review_id":145447682,"id":209427788,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTQyNzc4OA==","diff_hunk":"@@ -223,42 +421,108 @@ void CVuInterpreter::SUBbc_3(VuUnit_Base* unit, const VuInstruction inst)\n \n void CVuInterpreter::SUBA(VuUnit_Base* unit, const VuInstruction inst)\n {\n-    // TODO: Implement.\n-#if defined(BUILD_DEBUG)\n-    BOOST_LOG(Core::get_logger()) << boost::format(\"(%s, %d) SUBA: Not implemented.\") % __FILENAME__ % __LINE__;\n-#else\n-    throw std::runtime_error(\"SUBA: Not implemented.\");\n-#endif\n+    SizedQwordRegister& reg_source_1 = unit->vf[inst.fs()];\n+    SizedQwordRegister& reg_source_2 = unit->vf[inst.ft()];\n+    SizedQwordRegister& reg_dest = unit->acc;\n+\n+    unit->status.clear_flags();\n+\n+    FpuFlags flags;\n+    for (auto field : VuVectorField::VECTOR_FIELDS)\n+    {\n+        if (inst.test_dest_field(field))\n+        {\n+            const float a = reg_source_1.read_float(field);\n+            const float b = reg_source_2.read_float(field);\n+            const float result = to_ps2_float(a - b, flags);\n+            unit->mac.update_vector_field(field, flags);\n+            reg_dest.write_float(field, result);\n+        }\n+        else\n+        {\n+            unit->mac.clear_vector_field(field);\n+        }\n+    }\n }\n \n void CVuInterpreter::SUBAi(VuUnit_Base* unit, const VuInstruction inst)\n {\n-    // TODO: Implement.\n-#if defined(BUILD_DEBUG)\n-    BOOST_LOG(Core::get_logger()) << boost::format(\"(%s, %d) SUBAi: Not implemented.\") % __FILENAME__ % __LINE__;\n-#else\n-    throw std::runtime_error(\"SUBAi: Not implemented.\");\n-#endif\n+    SizedQwordRegister& reg_source_1 = unit->vf[inst.fs()];","path":"liborbum/src/Controller/Ee/Vpu/Vu/Interpreter/CVuInterpreter_FLOAT.cpp","position":445,"original_position":445,"commit_id":"ad9d71973360724c9114ce0273108521dd811a88","original_commit_id":"ad9d71973360724c9114ce0273108521dd811a88","user":{"login":"marco9999","id":1343222,"node_id":"MDQ6VXNlcjEzNDMyMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1343222?v=4","gravatar_id":"","url":"https://api.github.com/users/marco9999","html_url":"https://github.com/marco9999","followers_url":"https://api.github.com/users/marco9999/followers","following_url":"https://api.github.com/users/marco9999/following{/other_user}","gists_url":"https://api.github.com/users/marco9999/gists{/gist_id}","starred_url":"https://api.github.com/users/marco9999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco9999/subscriptions","organizations_url":"https://api.github.com/users/marco9999/orgs","repos_url":"https://api.github.com/users/marco9999/repos","events_url":"https://api.github.com/users/marco9999/events{/privacy}","received_events_url":"https://api.github.com/users/marco9999/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2018-08-11T14:11:04Z","updated_at":"2018-08-11T14:11:04Z","html_url":"https://github.com/marco9999/orbum/pull/12#discussion_r209427788","pull_request_url":"https://api.github.com/repos/marco9999/orbum/pulls/12","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/marco9999/orbum/pulls/comments/209427788"},"html":{"href":"https://github.com/marco9999/orbum/pull/12#discussion_r209427788"},"pull_request":{"href":"https://api.github.com/repos/marco9999/orbum/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/marco9999/orbum/pulls/12","id":207027889,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MDI3ODg5","html_url":"https://github.com/marco9999/orbum/pull/12","diff_url":"https://github.com/marco9999/orbum/pull/12.diff","patch_url":"https://github.com/marco9999/orbum/pull/12.patch","issue_url":"https://api.github.com/repos/marco9999/orbum/issues/12","number":12,"state":"open","locked":false,"title":"Implement VU float-related instructions","user":{"login":"hch12907","id":7030150,"node_id":"MDQ6VXNlcjcwMzAxNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/7030150?v=4","gravatar_id":"","url":"https://api.github.com/users/hch12907","html_url":"https://github.com/hch12907","followers_url":"https://api.github.com/users/hch12907/followers","following_url":"https://api.github.com/users/hch12907/following{/other_user}","gists_url":"https://api.github.com/users/hch12907/gists{/gist_id}","starred_url":"https://api.github.com/users/hch12907/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hch12907/subscriptions","organizations_url":"https://api.github.com/users/hch12907/orgs","repos_url":"https://api.github.com/users/hch12907/repos","events_url":"https://api.github.com/users/hch12907/events{/privacy}","received_events_url":"https://api.github.com/users/hch12907/received_events","type":"User","site_admin":false},"body":"Basically implemented all the instructions in CVuInterpreter_FLOAT, and fixed some of the floating point bugs.\r\nSome thorough checks required for this one huge PR. (especially the status flags)","created_at":"2018-08-08T14:30:02Z","updated_at":"2018-08-11T14:11:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df832b3828d6df66d2d8a0a49040d9a57a12b65b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/marco9999/orbum/pulls/12/commits","review_comments_url":"https://api.github.com/repos/marco9999/orbum/pulls/12/comments","review_comment_url":"https://api.github.com/repos/marco9999/orbum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/marco9999/orbum/issues/12/comments","statuses_url":"https://api.github.com/repos/marco9999/orbum/statuses/ad9d71973360724c9114ce0273108521dd811a88","head":{"label":"hch12907:master","ref":"master","sha":"ad9d71973360724c9114ce0273108521dd811a88","user":{"login":"hch12907","id":7030150,"node_id":"MDQ6VXNlcjcwMzAxNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/7030150?v=4","gravatar_id":"","url":"https://api.github.com/users/hch12907","html_url":"https://github.com/hch12907","followers_url":"https://api.github.com/users/hch12907/followers","following_url":"https://api.github.com/users/hch12907/following{/other_user}","gists_url":"https://api.github.com/users/hch12907/gists{/gist_id}","starred_url":"https://api.github.com/users/hch12907/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hch12907/subscriptions","organizations_url":"https://api.github.com/users/hch12907/orgs","repos_url":"https://api.github.com/users/hch12907/repos","events_url":"https://api.github.com/users/hch12907/events{/privacy}","received_events_url":"https://api.github.com/users/hch12907/received_events","type":"User","site_admin":false},"repo":{"id":139580478,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk1ODA0Nzg=","name":"orbum","full_name":"hch12907/orbum","owner":{"login":"hch12907","id":7030150,"node_id":"MDQ6VXNlcjcwMzAxNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/7030150?v=4","gravatar_id":"","url":"https://api.github.com/users/hch12907","html_url":"https://github.com/hch12907","followers_url":"https://api.github.com/users/hch12907/followers","following_url":"https://api.github.com/users/hch12907/following{/other_user}","gists_url":"https://api.github.com/users/hch12907/gists{/gist_id}","starred_url":"https://api.github.com/users/hch12907/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hch12907/subscriptions","organizations_url":"https://api.github.com/users/hch12907/orgs","repos_url":"https://api.github.com/users/hch12907/repos","events_url":"https://api.github.com/users/hch12907/events{/privacy}","received_events_url":"https://api.github.com/users/hch12907/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hch12907/orbum","description":"Update PCSX2's codebase to an OOP design and document everything.","fork":true,"url":"https://api.github.com/repos/hch12907/orbum","forks_url":"https://api.github.com/repos/hch12907/orbum/forks","keys_url":"https://api.github.com/repos/hch12907/orbum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hch12907/orbum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hch12907/orbum/teams","hooks_url":"https://api.github.com/repos/hch12907/orbum/hooks","issue_events_url":"https://api.github.com/repos/hch12907/orbum/issues/events{/number}","events_url":"https://api.github.com/repos/hch12907/orbum/events","assignees_url":"https://api.github.com/repos/hch12907/orbum/assignees{/user}","branches_url":"https://api.github.com/repos/hch12907/orbum/branches{/branch}","tags_url":"https://api.github.com/repos/hch12907/orbum/tags","blobs_url":"https://api.github.com/repos/hch12907/orbum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hch12907/orbum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hch12907/orbum/git/refs{/sha}","trees_url":"https://api.github.com/repos/hch12907/orbum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hch12907/orbum/statuses/{sha}","languages_url":"https://api.github.com/repos/hch12907/orbum/languages","stargazers_url":"https://api.github.com/repos/hch12907/orbum/stargazers","contributors_url":"https://api.github.com/repos/hch12907/orbum/contributors","subscribers_url":"https://api.github.com/repos/hch12907/orbum/subscribers","subscription_url":"https://api.github.com/repos/hch12907/orbum/subscription","commits_url":"https://api.github.com/repos/hch12907/orbum/commits{/sha}","git_commits_url":"https://api.github.com/repos/hch12907/orbum/git/commits{/sha}","comments_url":"https://api.github.com/repos/hch12907/orbum/comments{/number}","issue_comment_url":"https://api.github.com/repos/hch12907/orbum/issues/comments{/number}","contents_url":"https://api.github.com/repos/hch12907/orbum/contents/{+path}","compare_url":"https://api.github.com/repos/hch12907/orbum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hch12907/orbum/merges","archive_url":"https://api.github.com/repos/hch12907/orbum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hch12907/orbum/downloads","issues_url":"https://api.github.com/repos/hch12907/orbum/issues{/number}","pulls_url":"https://api.github.com/repos/hch12907/orbum/pulls{/number}","milestones_url":"https://api.github.com/repos/hch12907/orbum/milestones{/number}","notifications_url":"https://api.github.com/repos/hch12907/orbum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hch12907/orbum/labels{/name}","releases_url":"https://api.github.com/repos/hch12907/orbum/releases{/id}","deployments_url":"https://api.github.com/repos/hch12907/orbum/deployments","created_at":"2018-07-03T12:30:37Z","updated_at":"2018-08-08T16:22:36Z","pushed_at":"2018-08-08T16:22:34Z","git_url":"git://github.com/hch12907/orbum.git","ssh_url":"git@github.com:hch12907/orbum.git","clone_url":"https://github.com/hch12907/orbum.git","svn_url":"https://github.com/hch12907/orbum","homepage":null,"size":5870,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"marco9999:master","ref":"master","sha":"e5450e48e9b66c34170b7035497c7c75d57261a3","user":{"login":"marco9999","id":1343222,"node_id":"MDQ6VXNlcjEzNDMyMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1343222?v=4","gravatar_id":"","url":"https://api.github.com/users/marco9999","html_url":"https://github.com/marco9999","followers_url":"https://api.github.com/users/marco9999/followers","following_url":"https://api.github.com/users/marco9999/following{/other_user}","gists_url":"https://api.github.com/users/marco9999/gists{/gist_id}","starred_url":"https://api.github.com/users/marco9999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco9999/subscriptions","organizations_url":"https://api.github.com/users/marco9999/orgs","repos_url":"https://api.github.com/users/marco9999/repos","events_url":"https://api.github.com/users/marco9999/events{/privacy}","received_events_url":"https://api.github.com/users/marco9999/received_events","type":"User","site_admin":false},"repo":{"id":62718226,"node_id":"MDEwOlJlcG9zaXRvcnk2MjcxODIyNg==","name":"orbum","full_name":"marco9999/orbum","owner":{"login":"marco9999","id":1343222,"node_id":"MDQ6VXNlcjEzNDMyMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1343222?v=4","gravatar_id":"","url":"https://api.github.com/users/marco9999","html_url":"https://github.com/marco9999","followers_url":"https://api.github.com/users/marco9999/followers","following_url":"https://api.github.com/users/marco9999/following{/other_user}","gists_url":"https://api.github.com/users/marco9999/gists{/gist_id}","starred_url":"https://api.github.com/users/marco9999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco9999/subscriptions","organizations_url":"https://api.github.com/users/marco9999/orgs","repos_url":"https://api.github.com/users/marco9999/repos","events_url":"https://api.github.com/users/marco9999/events{/privacy}","received_events_url":"https://api.github.com/users/marco9999/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marco9999/orbum","description":"Update PCSX2's codebase to an OOP design and document everything.","fork":false,"url":"https://api.github.com/repos/marco9999/orbum","forks_url":"https://api.github.com/repos/marco9999/orbum/forks","keys_url":"https://api.github.com/repos/marco9999/orbum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marco9999/orbum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marco9999/orbum/teams","hooks_url":"https://api.github.com/repos/marco9999/orbum/hooks","issue_events_url":"https://api.github.com/repos/marco9999/orbum/issues/events{/number}","events_url":"https://api.github.com/repos/marco9999/orbum/events","assignees_url":"https://api.github.com/repos/marco9999/orbum/assignees{/user}","branches_url":"https://api.github.com/repos/marco9999/orbum/branches{/branch}","tags_url":"https://api.github.com/repos/marco9999/orbum/tags","blobs_url":"https://api.github.com/repos/marco9999/orbum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marco9999/orbum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marco9999/orbum/git/refs{/sha}","trees_url":"https://api.github.com/repos/marco9999/orbum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marco9999/orbum/statuses/{sha}","languages_url":"https://api.github.com/repos/marco9999/orbum/languages","stargazers_url":"https://api.github.com/repos/marco9999/orbum/stargazers","contributors_url":"https://api.github.com/repos/marco9999/orbum/contributors","subscribers_url":"https://api.github.com/repos/marco9999/orbum/subscribers","subscription_url":"https://api.github.com/repos/marco9999/orbum/subscription","commits_url":"https://api.github.com/repos/marco9999/orbum/commits{/sha}","git_commits_url":"https://api.github.com/repos/marco9999/orbum/git/commits{/sha}","comments_url":"https://api.github.com/repos/marco9999/orbum/comments{/number}","issue_comment_url":"https://api.github.com/repos/marco9999/orbum/issues/comments{/number}","contents_url":"https://api.github.com/repos/marco9999/orbum/contents/{+path}","compare_url":"https://api.github.com/repos/marco9999/orbum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marco9999/orbum/merges","archive_url":"https://api.github.com/repos/marco9999/orbum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marco9999/orbum/downloads","issues_url":"https://api.github.com/repos/marco9999/orbum/issues{/number}","pulls_url":"https://api.github.com/repos/marco9999/orbum/pulls{/number}","milestones_url":"https://api.github.com/repos/marco9999/orbum/milestones{/number}","notifications_url":"https://api.github.com/repos/marco9999/orbum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marco9999/orbum/labels{/name}","releases_url":"https://api.github.com/repos/marco9999/orbum/releases{/id}","deployments_url":"https://api.github.com/repos/marco9999/orbum/deployments","created_at":"2016-07-06T12:09:28Z","updated_at":"2018-08-08T19:18:12Z","pushed_at":"2018-08-08T16:22:35Z","git_url":"git://github.com/marco9999/orbum.git","ssh_url":"git@github.com:marco9999/orbum.git","clone_url":"https://github.com/marco9999/orbum.git","svn_url":"https://github.com/marco9999/orbum","homepage":null,"size":5983,"stargazers_count":48,"watchers_count":48,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":4,"open_issues":1,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marco9999/orbum/pulls/12"},"html":{"href":"https://github.com/marco9999/orbum/pull/12"},"issue":{"href":"https://api.github.com/repos/marco9999/orbum/issues/12"},"comments":{"href":"https://api.github.com/repos/marco9999/orbum/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/marco9999/orbum/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/marco9999/orbum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/marco9999/orbum/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/marco9999/orbum/statuses/ad9d71973360724c9114ce0273108521dd811a88"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"marco9999"}}