Get started on collide-func and clean up log forms in decompiler (#713)

* wip

* temp

* temp2

* first part of log macros

* more log macros

* logtest

* clean up

* dont initialize game info because we are missing stuff
This commit is contained in:
water111
2021-07-23 20:51:26 -04:00
committed by GitHub
parent 65b61d05e6
commit 95366d21df
73 changed files with 1900 additions and 1017 deletions
+8 -10
View File
@@ -299,10 +299,11 @@ TEST_F(FormRegressionTest, IterateProcessTree) {
" daddiu sp, sp, 80";
std::string type = "(function process-tree (function object object) kernel-context object)";
std::string expected =
"(let ((s4-0 (or (nonzero? (logand (-> arg0 mask) (process-mask process-tree))) (arg1 "
"arg0))))\n"
"(let\n"
" ((s4-0 (or (logtest? (-> arg0 mask) (process-mask process-tree)) (arg1 arg0)))\n"
" )\n"
" (cond\n"
" ((= s4-0 (quote dead))\n"
" ((= s4-0 'dead)\n"
" )\n"
" (else\n"
" (let ((v1-4 (-> arg0 child)))\n"
@@ -728,13 +729,10 @@ TEST_F(FormRegressionTest, DmaSend) {
" (.sync.l)\n"
" (set!\n"
" (-> arg0 madr)\n"
" (logior\n"
" (logand #xfffffff (the-as int arg1))\n"
" (the-as uint (if (= (logand #x70000000 (the-as int arg1)) #x70000000)\n"
" (shl #x8000 16)\n" // note: maybe this should be #x80000000? Not sure.
" 0\n"
" )\n"
" )\n"
" (logior (logand #xfffffff arg1) (if (= (logand #x70000000 arg1) #x70000000)\n"
" (shl #x8000 16)\n"
" 0\n"
" )\n"
" )\n"
" )\n"
" (set! (-> arg0 qwc) arg2)\n"