mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-07 02:42:58 +00:00
ir: Add opcodes for performing vector absolute floating-point values
This will be usable for implementing FACGE and FACGT
This commit is contained in:
@@ -1491,6 +1491,17 @@ U64 IREmitter::FPU32ToDouble(const U32& a, bool round_to_nearest, bool fpscr_con
|
||||
return Inst<U64>(Opcode::FPU32ToDouble, a, Imm1(round_to_nearest));
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorAbs(size_t esize, const U128& a) {
|
||||
switch (esize) {
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorAbs32, a);
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorAbs64, a);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorAbsoluteDifference(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 32:
|
||||
|
||||
@@ -273,6 +273,7 @@ public:
|
||||
U64 FPS32ToDouble(const U32& a, bool round_to_nearest, bool fpscr_controlled);
|
||||
U64 FPU32ToDouble(const U32& a, bool round_to_nearest, bool fpscr_controlled);
|
||||
|
||||
U128 FPVectorAbs(size_t esize, const U128& a);
|
||||
U128 FPVectorAbsoluteDifference(size_t esize, const U128& a, const U128& b);
|
||||
U128 FPVectorAdd(size_t esize, const U128& a, const U128& b);
|
||||
U128 FPVectorDiv(size_t esize, const U128& a, const U128& b);
|
||||
|
||||
@@ -396,6 +396,8 @@ OPCODE(FPU32ToDouble, T::U64, T::U32, T::U
|
||||
OPCODE(FPS32ToDouble, T::U64, T::U32, T::U1 )
|
||||
|
||||
// Floating-point vector instructions
|
||||
OPCODE(FPVectorAbs32, T::U128, T::U128 )
|
||||
OPCODE(FPVectorAbs64, T::U128, T::U128 )
|
||||
OPCODE(FPVectorAbsoluteDifference32, T::U128, T::U128, T::U128 )
|
||||
OPCODE(FPVectorAbsoluteDifference64, T::U128, T::U128, T::U128 )
|
||||
OPCODE(FPVectorAdd32, T::U128, T::U128, T::U128 )
|
||||
|
||||
Reference in New Issue
Block a user