Merge pull request #2719 from lioncash/flags

OpcodeDispatcher: Ensure MXCSR is saved/restored with FXSAVE/FXRSTOR
This commit is contained in:
Ryan Houdek authored and GitHub committed 2023-06-16 13:01:56 -07:00
commit 66d4206cd7
1 file changed
+5
@@ -2457,6 +2457,7 @@ void OpDispatchBuilder::FXSaveOp(OpcodeArgs) {
SaveX87State(Op, Mem);
SaveSSEState(Mem);
SaveMXCSRState(Mem);
}
void OpDispatchBuilder::XSaveOp(OpcodeArgs) {
@@ -2667,6 +2668,10 @@ void OpDispatchBuilder::FXRStoreOp(OpcodeArgs) {
RestoreX87State(Mem);
RestoreSSEState(Mem);
OrderedNode *MXCSRLocation = _Add(Mem, _Constant(24));
OrderedNode *MXCSR = _LoadMem(GPRClass, 4, MXCSRLocation, 4);
RestoreMXCSRState(MXCSR);
}
void OpDispatchBuilder::XRstorOpImpl(OpcodeArgs) {