mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-10 04:06:26 +00:00
VFP: Implement VMOV (all variants)
This commit is contained in:
@@ -1168,6 +1168,34 @@ static void FPTwoOp64(BlockOfCode* code, RegAlloc& reg_alloc, IR::Block& block,
|
||||
}
|
||||
}
|
||||
|
||||
void EmitX64::EmitTransferFromFP32(IR::Block& block, IR::Inst* inst) {
|
||||
X64Reg result = reg_alloc.DefRegister(inst, any_gpr);
|
||||
X64Reg source = reg_alloc.UseRegister(inst->GetArg(0), any_xmm);
|
||||
// TODO: Eliminate this.
|
||||
code->MOVD_xmm(R(result), source);
|
||||
}
|
||||
|
||||
void EmitX64::EmitTransferFromFP64(IR::Block& block, IR::Inst* inst) {
|
||||
X64Reg result = reg_alloc.DefRegister(inst, any_gpr);
|
||||
X64Reg source = reg_alloc.UseRegister(inst->GetArg(0), any_xmm);
|
||||
// TODO: Eliminate this.
|
||||
code->MOVQ_xmm(R(result), source);
|
||||
}
|
||||
|
||||
void EmitX64::EmitTransferToFP32(IR::Block& block, IR::Inst* inst) {
|
||||
X64Reg result = reg_alloc.DefRegister(inst, any_xmm);
|
||||
X64Reg source = reg_alloc.UseRegister(inst->GetArg(0), any_gpr);
|
||||
// TODO: Eliminate this.
|
||||
code->MOVD_xmm(result, R(source));
|
||||
}
|
||||
|
||||
void EmitX64::EmitTransferToFP64(IR::Block& block, IR::Inst* inst) {
|
||||
X64Reg result = reg_alloc.DefRegister(inst, any_xmm);
|
||||
X64Reg source = reg_alloc.UseRegister(inst->GetArg(0), any_gpr);
|
||||
// TODO: Eliminate this.
|
||||
code->MOVQ_xmm(result, R(source));
|
||||
}
|
||||
|
||||
void EmitX64::EmitFPAbs32(IR::Block&, IR::Inst* inst) {
|
||||
IR::Value a = inst->GetArg(0);
|
||||
|
||||
|
||||
@@ -243,10 +243,14 @@ Gen::X64Reg RegAlloc::UseScratchRegister(IR::Inst* use_inst, HostLocList desired
|
||||
DEBUG_ASSERT(LocInfo(new_location).IsScratch());
|
||||
return HostLocToX64(new_location);
|
||||
} else if (HostLocIsRegister(current_location)) {
|
||||
ASSERT(LocInfo(current_location).IsIdle());
|
||||
ASSERT(LocInfo(current_location).IsIdle()
|
||||
|| LocInfo(current_location).IsUse()
|
||||
|| LocInfo(current_location).IsUseDef());
|
||||
|
||||
if (current_location != new_location) {
|
||||
EmitMove(new_location, current_location);
|
||||
} else {
|
||||
ASSERT(LocInfo(current_location).IsIdle());
|
||||
}
|
||||
|
||||
LocInfo(new_location).is_being_used = true;
|
||||
|
||||
Reference in New Issue
Block a user