Skip to content

Commit 9ff80d8

Browse files
committed
make store instructions check for mmio
1 parent 830be1f commit 9ff80d8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

XenonRecomp/recompiler.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ bool Recompiler::Recompile(
16061606

16071607
case PPC_INST_STBU:
16081608
println("\t{} = {} + {}.u32;", ea(), int32_t(insn.operands[1]), r(insn.operands[2]));
1609-
println("\tPPC_STORE_U8({}, {}.u8);", ea(), r(insn.operands[0]));
1609+
println("\t{}{}, {}.u8);", mmioStore() ? "PPC_MM_STORE_U8(" : "PPC_STORE_U8(", ea(), r(insn.operands[0]));
16101610
println("\t{}.u32 = {};", r(insn.operands[2]), ea());
16111611
break;
16121612

@@ -1619,7 +1619,7 @@ bool Recompiler::Recompile(
16191619

16201620
case PPC_INST_STBUX:
16211621
println("\t{} = {}.u32 + {}.u32;", ea(), r(insn.operands[1]), r(insn.operands[2]));
1622-
println("\tPPC_STORE_U8({}, {}.u8);", ea(), r(insn.operands[0]));
1622+
println("\t{}{}, {}.u8);", mmioStore() ? "PPC_MM_STORE_U8(" : "PPC_STORE_U8(", ea(), r(insn.operands[0]));
16231623
println("\t{}.u32 = {};", r(insn.operands[1]), ea());
16241624
break;
16251625

@@ -1642,7 +1642,7 @@ bool Recompiler::Recompile(
16421642

16431643
case PPC_INST_STDU:
16441644
println("\t{} = {} + {}.u32;", ea(), int32_t(insn.operands[1]), r(insn.operands[2]));
1645-
println("\tPPC_STORE_U64({}, {}.u64);", ea(), r(insn.operands[0]));
1645+
println("\t{}{}, {}.u64);", mmioStore() ? "PPC_MM_STORE_U64(" : "PPC_STORE_U64(", ea(), r(insn.operands[0]));
16461646
println("\t{}.u32 = {};", r(insn.operands[2]), ea());
16471647
break;
16481648

@@ -1655,7 +1655,7 @@ bool Recompiler::Recompile(
16551655

16561656
case PPC_INST_STDUX:
16571657
println("\t{} = {}.u32 + {}.u32;", ea(), r(insn.operands[1]), r(insn.operands[2]));
1658-
println("\tPPC_STORE_U64({}, {}.u64);", ea(), r(insn.operands[0]));
1658+
println("\t{}{}, {}.u64);", mmioStore() ? "PPC_MM_STORE_U64(" : "PPC_STORE_U64(", ea(), r(insn.operands[0]));
16591659
println("\t{}.u32 = {};", r(insn.operands[1]), ea());
16601660
break;
16611661

@@ -1670,7 +1670,7 @@ bool Recompiler::Recompile(
16701670
case PPC_INST_STFDU:
16711671
printSetFlushMode(false);
16721672
println("\t{} = {} + {}.u32;", ea(), int32_t(insn.operands[1]), r(insn.operands[2]));
1673-
println("\tPPC_STORE_U64({}, {}.u64);", ea(), r(insn.operands[0]));
1673+
println("\t{}{}, {}.u64);", mmioStore() ? "PPC_MM_STORE_U64(" : "PPC_STORE_U64(", ea(), r(insn.operands[0]));
16741674
println("\t{}.u32 = {};", r(insn.operands[2]), ea());
16751675
break;
16761676

@@ -1703,7 +1703,7 @@ bool Recompiler::Recompile(
17031703
printSetFlushMode(false);
17041704
println("\t{}.f32 = float({}.f64);", temp(), f(insn.operands[0]));
17051705
println("\t{} = {} + {}.u32;", ea(), int32_t(insn.operands[1]), r(insn.operands[2]));
1706-
println("\tPPC_STORE_U32({}, {}.u32);", ea(), temp());
1706+
println("\t{}{}, {}.u32);", mmioStore() ? "PPC_MM_STORE_U32(" : "PPC_STORE_U32(", ea(), temp());
17071707
println("\t{}.u32 = {};", r(insn.operands[2]), ea());
17081708
break;
17091709

@@ -1720,7 +1720,7 @@ bool Recompiler::Recompile(
17201720
printSetFlushMode(false);
17211721
println("\t{}.f32 = float({}.f64);", temp(), f(insn.operands[0]));
17221722
println("\t{} = {}.u32 + {}.u32;", ea(), r(insn.operands[1]), r(insn.operands[2]));
1723-
println("\tPPC_STORE_U32({}, {}.u32);", ea(), temp());
1723+
println("\t{}{}, {}.u32);", mmioStore() ? "PPC_MM_STORE_U32(" : "PPC_STORE_U32(", ea(), temp());
17241724
println("\t{}.u32 = {};", r(insn.operands[1]), ea());
17251725
break;
17261726

@@ -1733,13 +1733,13 @@ bool Recompiler::Recompile(
17331733

17341734
case PPC_INST_STHU:
17351735
println("\t{} = {} + {}.u32;", ea(), int32_t(insn.operands[1]), r(insn.operands[2]));
1736-
println("\tPPC_STORE_U16({}, {}.u16);", ea(), r(insn.operands[0]));
1736+
println("\t{}{}, {}.u16);", mmioStore() ? "PPC_MM_STORE_U16(" : "PPC_STORE_U16(", ea(), r(insn.operands[0]));
17371737
println("\t{}.u32 = {};", r(insn.operands[2]), ea());
17381738
break;
17391739

17401740
case PPC_INST_STHUX:
17411741
println("\t{} = {}.u32 + {}.u32;", ea(), r(insn.operands[1]), r(insn.operands[2]));
1742-
println("\tPPC_STORE_U16({}, {}.u16);", ea(), r(insn.operands[0]));
1742+
println("\t{}{}, {}.u16);", mmioStore() ? "PPC_MM_STORE_U16(" : "PPC_STORE_U16(", ea(), r(insn.operands[0]));
17431743
println("\t{}.u32 = {};", r(insn.operands[1]), ea());
17441744
break;
17451745

@@ -1838,13 +1838,13 @@ bool Recompiler::Recompile(
18381838

18391839
case PPC_INST_STWU:
18401840
println("\t{} = {} + {}.u32;", ea(), int32_t(insn.operands[1]), r(insn.operands[2]));
1841-
println("\tPPC_STORE_U32({}, {}.u32);", ea(), r(insn.operands[0]));
1841+
println("\t{}{}, {}.u32);", mmioStore() ? "PPC_MM_STORE_U32(" : "PPC_STORE_U32(", ea(), r(insn.operands[0]));
18421842
println("\t{}.u32 = {};", r(insn.operands[2]), ea());
18431843
break;
18441844

18451845
case PPC_INST_STWUX:
18461846
println("\t{} = {}.u32 + {}.u32;", ea(), r(insn.operands[1]), r(insn.operands[2]));
1847-
println("\tPPC_STORE_U32({}, {}.u32);", ea(), r(insn.operands[0]));
1847+
println("\t{}{}, {}.u32);", mmioStore() ? "PPC_MM_STORE_U32(" : "PPC_STORE_U32(", ea(), r(insn.operands[0]));
18481848
println("\t{}.u32 = {};", r(insn.operands[1]), ea());
18491849
break;
18501850

0 commit comments

Comments
 (0)