emit_x64: Reduce mxscr operations in EmitGetFpscr and EmitSetFpscr
This commit is contained in:
parent
0af1e7723d
commit
05f3f07704
1 changed files with 2 additions and 4 deletions
|
@ -449,9 +449,8 @@ void EmitX64::EmitGetFpscr(RegAlloc& reg_alloc, IR::Block&, IR::Inst* inst) {
|
||||||
reg_alloc.HostCall(inst);
|
reg_alloc.HostCall(inst);
|
||||||
code->mov(code->ABI_PARAM1, code->r15);
|
code->mov(code->ABI_PARAM1, code->r15);
|
||||||
|
|
||||||
code->SwitchMxcsrOnExit();
|
code->stmxcsr(code->dword[code->r15 + offsetof(JitState, guest_MXCSR)]);
|
||||||
code->CallFunction(&GetFpscrImpl);
|
code->CallFunction(&GetFpscrImpl);
|
||||||
code->SwitchMxcsrOnEntry();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetFpscrImpl(u32 value, JitState* jit_state) {
|
static void SetFpscrImpl(u32 value, JitState* jit_state) {
|
||||||
|
@ -463,9 +462,8 @@ void EmitX64::EmitSetFpscr(RegAlloc& reg_alloc, IR::Block&, IR::Inst* inst) {
|
||||||
reg_alloc.HostCall(nullptr, args[0]);
|
reg_alloc.HostCall(nullptr, args[0]);
|
||||||
code->mov(code->ABI_PARAM2, code->r15);
|
code->mov(code->ABI_PARAM2, code->r15);
|
||||||
|
|
||||||
code->SwitchMxcsrOnExit();
|
|
||||||
code->CallFunction(&SetFpscrImpl);
|
code->CallFunction(&SetFpscrImpl);
|
||||||
code->SwitchMxcsrOnEntry();
|
code->ldmxcsr(code->dword[code->r15 + offsetof(JitState, guest_MXCSR)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitX64::EmitGetFpscrNZCV(RegAlloc& reg_alloc, IR::Block&, IR::Inst* inst) {
|
void EmitX64::EmitGetFpscrNZCV(RegAlloc& reg_alloc, IR::Block&, IR::Inst* inst) {
|
||||||
|
|
Loading…
Reference in a new issue