[decompiler] Small bitfield fixes (#599)

* fix a bunch of small bitfield related things

* fix up test

* format
This commit is contained in:
water111
2021-06-16 21:11:21 -04:00
committed by GitHub
parent b209c9e1ba
commit d26de26d21
13 changed files with 125 additions and 83 deletions
+6 -9
View File
@@ -553,8 +553,8 @@ TEST_F(FormRegressionTest, ExprDisasmVif) {
" \" (~s :irq ~D :wl ~D :cl ~D)~%\"\n"
" (-> *vif-disasm-table* v1-0 string1)\n"
" (-> s1-0 irq)\n"
" (shr (shl (the-as int t1-1) 48) 56)\n"
" (shr (shl (the-as int t1-1) 56) 56)\n"
" (shr (shl t1-1 48) 56)\n"
" (shr (shl t1-1 56) 56)\n"
" )\n"
" )\n"
" )\n"
@@ -636,10 +636,7 @@ TEST_F(FormRegressionTest, ExprDisasmVif) {
" (the-as\n"
" int\n"
" (+\n"
" (*\n"
" (-> *vif-disasm-table* v1-0 val)\n"
" (the-as uint (-> s1-0 num))\n"
" )\n"
" (* (-> *vif-disasm-table* v1-0 val) (-> s1-0 num))\n"
" 3\n"
" )\n"
" )\n"
@@ -655,14 +652,14 @@ TEST_F(FormRegressionTest, ExprDisasmVif) {
" (-> *vif-disasm-table* v1-0 string1)\n"
" (-> s1-0 irq)\n"
" (-> s1-0 num)\n"
" (shr (shl (the-as int sv-64) 54) 54)\n"
" (shr (shl sv-64 54) 54)\n"
" )\n"
" (format\n"
" arg2\n"
" \":msk ~D :flg ~D :usn ~D [skip ~d])~%\"\n"
" (-> s1-0 msk)\n"
" (shr (shl (the-as int sv-64) 48) 63)\n"
" (shr (shl (the-as int sv-64) 49) 63)\n"
" (shr (shl sv-64 48) 63)\n"
" (shr (shl sv-64 49) 63)\n"
" (the-as uint s0-0)\n"
" )\n"
" (if arg3\n"