mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-05 05:58:19 +01:00
IR: Implement FPMax, FPMin
This commit is contained in:
parent
aed4fd3ec3
commit
2cb0a699ba
4 changed files with 42 additions and 0 deletions
|
|
@ -1068,6 +1068,26 @@ U32U64 IREmitter::FPDiv(const U32U64& a, const U32U64& b, bool fpscr_controlled)
|
|||
}
|
||||
}
|
||||
|
||||
U32U64 IREmitter::FPMax(const U32U64& a, const U32U64& b, bool fpscr_controlled) {
|
||||
ASSERT(fpscr_controlled);
|
||||
ASSERT(a.GetType() == b.GetType());
|
||||
if (a.GetType() == Type::U32) {
|
||||
return Inst<U32>(Opcode::FPMax32, a, b);
|
||||
} else {
|
||||
return Inst<U64>(Opcode::FPMax64, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
U32U64 IREmitter::FPMin(const U32U64& a, const U32U64& b, bool fpscr_controlled) {
|
||||
ASSERT(fpscr_controlled);
|
||||
ASSERT(a.GetType() == b.GetType());
|
||||
if (a.GetType() == Type::U32) {
|
||||
return Inst<U32>(Opcode::FPMin32, a, b);
|
||||
} else {
|
||||
return Inst<U64>(Opcode::FPMin64, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
U32U64 IREmitter::FPMul(const U32U64& a, const U32U64& b, bool fpscr_controlled) {
|
||||
ASSERT(fpscr_controlled);
|
||||
ASSERT(a.GetType() == b.GetType());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue