[Decompiler] Fixes for dma-disasm (#377)

* small tweaks

* fix up some more dma stuff
This commit is contained in:
water111
2021-04-23 20:29:15 -04:00
committed by GitHub
parent 0b8a878533
commit fa122356ec
57 changed files with 467 additions and 433 deletions
+11 -10
View File
@@ -148,9 +148,9 @@ TEST_F(DataDecompTest, SimpleStructure) {
auto parsed = parse_data(input);
auto decomp = decompile_at_label(TypeSpec("vif-disasm-element"), parsed.label("L217"),
parsed.labels, {parsed.words}, dts->ts);
check_forms_equal(
decomp.print(),
"(new 'static 'vif-disasm-element :mask #x7f :tag #x1 :print #x2 :string1 \"stcycl\")");
check_forms_equal(decomp.print(),
"(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcycl) :print "
"#x2 :string1 \"stcycl\")");
}
TEST_F(DataDecompTest, VifDisasmArray) {
@@ -209,13 +209,14 @@ TEST_F(DataDecompTest, VifDisasmArray) {
auto parsed = parse_data(input);
auto decomp =
decompile_at_label_guess_type(parsed.label("L148"), parsed.labels, {parsed.words}, dts->ts);
check_forms_equal(
decomp.print(),
"(new 'static 'boxed-array vif-disasm-element 3\n"
" (new 'static 'vif-disasm-element :mask #x7f :string1 \"nop\")\n"
" (new 'static 'vif-disasm-element :mask #x7f :tag #x1 :print #x2 :string1 \"stcycl\")\n"
" (new 'static 'vif-disasm-element :mask #x7f :tag #x2 :print #x1 :string1 \"offset\" "
" :string2 \"offset\"))");
check_forms_equal(decomp.print(),
"(new 'static 'boxed-array vif-disasm-element 3\n"
" (new 'static 'vif-disasm-element :mask #x7f :string1 \"nop\")\n"
" (new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcycl) :print "
"#x2 :string1 \"stcycl\")\n"
" (new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 offset) :print "
"#x1 :string1 \"offset\" "
" :string2 \"offset\"))");
}
TEST_F(DataDecompTest, ContinuePoint) {