mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 15:00:17 +02:00
Add x87 FTW to CoreState
This will be needed for x87 FTW emulation
This commit is contained in:
1 parent
ec6cc5cb4f
commit
77a7ecbae0
2 files changed
+15
-1
No files matched your search
+14
-1
@@ -40,7 +40,7 @@ namespace {
|
||||
std::vector<ContextMemberInfo> ClassificationInfo;
|
||||
};
|
||||
|
||||
constexpr static std::array<LastAccessType, 15> DefaultAccess = {
|
||||
constexpr static std::array<LastAccessType, 16> DefaultAccess = {
|
||||
ACCESS_NONE,
|
||||
ACCESS_NONE,
|
||||
ACCESS_INVALID, // PAD
|
||||
@@ -56,6 +56,7 @@ namespace {
|
||||
ACCESS_NONE,
|
||||
ACCESS_NONE,
|
||||
ACCESS_NONE,
|
||||
ACCESS_NONE,
|
||||
};
|
||||
|
||||
static void ClassifyContextStruct(ContextInfo *ContextClassificationInfo) {
|
||||
@@ -208,6 +209,17 @@ namespace {
|
||||
FEXCore::IR::InvalidClass,
|
||||
});
|
||||
|
||||
// FTW
|
||||
ContextClassification->emplace_back(ContextMemberInfo {
|
||||
ContextMemberClassification {
|
||||
offsetof(FEXCore::Core::CPUState, FTW),
|
||||
sizeof(FEXCore::Core::CPUState::FTW),
|
||||
},
|
||||
DefaultAccess[15],
|
||||
FEXCore::IR::InvalidClass,
|
||||
});
|
||||
|
||||
|
||||
size_t ClassifiedStructSize{};
|
||||
ContextClassificationInfo->Lookup.reserve(sizeof(FEXCore::Core::CPUState));
|
||||
for (auto &it : *ContextClassification) {
|
||||
@@ -270,6 +282,7 @@ namespace {
|
||||
}
|
||||
|
||||
SetAccess(Offset++, DefaultAccess[14]);
|
||||
SetAccess(Offset++, DefaultAccess[15]);
|
||||
}
|
||||
|
||||
struct BlockInfo {
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FEXCore::Core {
|
||||
uint32_t base;
|
||||
} gdt[32];
|
||||
uint16_t FCW;
|
||||
uint16_t FTW;
|
||||
};
|
||||
static_assert(offsetof(CPUState, xmm) % 16 == 0, "xmm needs to be 128bit aligned!");
|
||||
|
||||
|
||||
Reference in new issue
Block a user