mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 08:00:15 +02:00
Fix x87 tag word not updating on FST ST(0) self-store
This commit is contained in:
1 parent
ed3fa2f1c6
commit
7236c2bf0a
2 files changed
+7
-11
No files matched your search
@@ -139,9 +139,7 @@ void OpDispatchBuilder::FST(OpcodeArgs, IR::OpSize Width) {
|
||||
|
||||
void OpDispatchBuilder::FSTToStack(OpcodeArgs) {
|
||||
const uint8_t Offset = Op->OP & 7;
|
||||
if (Offset != 0) {
|
||||
_StoreStackToStack(Offset);
|
||||
}
|
||||
_StoreStackToStack(Offset);
|
||||
|
||||
if (Op->TableInfo->Flags & X86Tables::InstFlags::FLAGS_POP) {
|
||||
_PopStackDestroy();
|
||||
|
||||
@@ -1041,15 +1041,13 @@ void X87StackOptimization::Run(IREmitter* Emit) {
|
||||
const auto* Op = IROp->C<IROp_StoreStackToStack>();
|
||||
auto Offset = Op->StackLocation;
|
||||
|
||||
if (Offset != 0) {
|
||||
auto Value = MigrateToSlowPath_IfInvalid();
|
||||
auto Value = MigrateToSlowPath_IfInvalid();
|
||||
|
||||
// Need to store st0 to stack location - basically a copy.
|
||||
if (SlowPath) {
|
||||
StoreStackValueAtOffset_Slow(LoadStackValueAtOffset_Slow(), Offset);
|
||||
} else {
|
||||
StackData.setTop(*Value, Offset);
|
||||
}
|
||||
// Need to store st0 to stack location - basically a copy.
|
||||
if (SlowPath) {
|
||||
StoreStackValueAtOffset_Slow(LoadStackValueAtOffset_Slow(), Offset);
|
||||
} else {
|
||||
StackData.setTop(*Value, Offset);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user