Skip to content

Commit 30aaec9

Browse files
committed
Define ST and MM floating point values separately
1 parent c6791b1 commit 30aaec9

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

modules/core/include/virt86/vp/fpregs.hpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,20 @@ union MXCSR {
8585

8686
// ST(#) register value
8787
#pragma pack(push, 1)
88-
struct FPValue {
88+
struct STValue {
8989
uint64_t significand;
9090
uint16_t exponentSign;
9191
};
9292
#pragma pack(pop)
93-
static_assert(sizeof(FPValue) == 10);
93+
static_assert(sizeof(STValue) == 10);
94+
95+
union MMValue {
96+
int64_t i64[1];
97+
int32_t i32[2];
98+
int16_t i16[4];
99+
int8_t i8[8];
100+
};
101+
static_assert(sizeof(MMValue) == 8);
94102

95103
// XMM# register value
96104
union XMMValue {
@@ -191,9 +199,10 @@ struct FXSAVEArea {
191199
};
192200
MXCSR mxcsr;
193201
MXCSR mxcsr_mask;
194-
struct {
195-
FPValue value;
196-
uint8_t _padding[6];
202+
union {
203+
STValue st;
204+
MMValue mm;
205+
uint8_t _padding[16];
197206
} st_mm[8];
198207

199208
XMMValue xmm[16];

0 commit comments

Comments
 (0)