mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-23 05:00:48 +02:00
ConstProp: treat StoreContext as zeroable
todo: FPR equivalent. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
d20b46e46f
commit
610caf8529
2 files changed
+3
-2
No files matched your search
@@ -52,7 +52,7 @@ DEF_OP(StoreContext) {
|
||||
const auto OpSize = IROp->Size;
|
||||
|
||||
if (Op->Class == FEXCore::IR::GPRClass) {
|
||||
auto Src = GetReg(Op->Value.ID());
|
||||
auto Src = GetZeroableReg(Op->Value);
|
||||
|
||||
switch (OpSize) {
|
||||
case 1: strb(Src, STATE, Op->Offset); break;
|
||||
|
||||
@@ -629,7 +629,8 @@ void ConstProp::ConstantInlining(IREmitter* IREmit, const IRListView& CurrentIR)
|
||||
break;
|
||||
}
|
||||
case OP_ADC:
|
||||
case OP_ADCWITHFLAGS: {
|
||||
case OP_ADCWITHFLAGS:
|
||||
case OP_STORECONTEXT: {
|
||||
uint64_t Constant1 {};
|
||||
if (IREmit->IsValueConstant(IROp->Args[0], &Constant1)) {
|
||||
if (Constant1 == 0) {
|
||||
|
||||
Reference in new issue
Block a user