mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-04 12:43:40 +00:00
Add x87/MMX registers to test harness
This commit is contained in:
parent
3a460b4bf0
commit
d4cffa5354
@ -41,8 +41,17 @@ class Regs(Flag):
|
||||
REG_GS = (1 << 33)
|
||||
REG_FS = (1 << 34)
|
||||
REG_FLAGS = (1 << 35)
|
||||
REG_ALL = (1 << 36) - 1
|
||||
REG_INVALID = (1 << 36)
|
||||
REG_MM0 = (1 << 36)
|
||||
REG_MM1 = (1 << 37)
|
||||
REG_MM2 = (1 << 38)
|
||||
REG_MM3 = (1 << 39)
|
||||
REG_MM4 = (1 << 40)
|
||||
REG_MM5 = (1 << 41)
|
||||
REG_MM6 = (1 << 42)
|
||||
REG_MM7 = (1 << 43)
|
||||
REG_MM8 = (1 << 44)
|
||||
REG_ALL = (1 << 45) - 1
|
||||
REG_INVALID = (1 << 45)
|
||||
|
||||
class ABI(Flag) :
|
||||
ABI_SYSTEMV = 0
|
||||
@ -88,6 +97,15 @@ RegStringLookup = {
|
||||
"FS": Regs.REG_FS,
|
||||
"FLAGS": Regs.REG_FLAGS,
|
||||
"ALL": Regs.REG_ALL,
|
||||
"MM0": Regs.REG_MM0,
|
||||
"MM1": Regs.REG_MM1,
|
||||
"MM2": Regs.REG_MM2,
|
||||
"MM3": Regs.REG_MM3,
|
||||
"MM4": Regs.REG_MM4,
|
||||
"MM5": Regs.REG_MM5,
|
||||
"MM6": Regs.REG_MM6,
|
||||
"MM7": Regs.REG_MM7,
|
||||
"MM8": Regs.REG_MM8,
|
||||
}
|
||||
|
||||
ABIStringLookup = {
|
||||
|
@ -156,7 +156,7 @@ namespace FEX::HarnessHelper {
|
||||
|
||||
if (BaseConfig.OptionRegDataCount > 0) {
|
||||
uintptr_t DataOffset = sizeof(ConfigStructBase);
|
||||
constexpr std::array<std::pair<uint64_t, unsigned>, 36> OffsetArray = {{
|
||||
constexpr std::array<std::pair<uint64_t, unsigned>, 45> OffsetArray = {{
|
||||
{offsetof(FEXCore::Core::CPUState, rip), 1},
|
||||
{offsetof(FEXCore::Core::CPUState, gregs[0]), 1},
|
||||
{offsetof(FEXCore::Core::CPUState, gregs[1]), 1},
|
||||
@ -193,6 +193,15 @@ namespace FEX::HarnessHelper {
|
||||
{offsetof(FEXCore::Core::CPUState, gs), 1},
|
||||
{offsetof(FEXCore::Core::CPUState, fs), 1},
|
||||
{offsetof(FEXCore::Core::CPUState, flags), 8},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[0][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[1][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[2][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[3][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[4][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[5][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[6][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[7][0]), 2},
|
||||
{offsetof(FEXCore::Core::CPUState, mm[8][0]), 2},
|
||||
}};
|
||||
|
||||
// Offset past the Memory regions if there are any
|
||||
@ -234,6 +243,9 @@ namespace FEX::HarnessHelper {
|
||||
Name ="fs";
|
||||
else if (NameIndex == 35)
|
||||
Name = "rflags";
|
||||
else if (NameIndex >= 36 && NameIndex < 45)
|
||||
Name = "MM[" + std::to_string(NameIndex - 36) + "][" + std::to_string(j) + "]";
|
||||
|
||||
|
||||
CheckGPRs("Core1: " + Name + ": ", State1Data[j], RegData->RegValues[j]);
|
||||
CheckGPRs("Core2: " + Name + ": ", State2Data[j], RegData->RegValues[j]);
|
||||
|
@ -15,6 +15,8 @@
|
||||
; RIP
|
||||
; FS, GS
|
||||
; Flags
|
||||
; -- X87 / MMX / 3DNow --
|
||||
; MM0-MM7
|
||||
; ===========================
|
||||
; Match: Forces full matching of types
|
||||
; - Type: String or List of strings
|
||||
|
Loading…
Reference in New Issue
Block a user