mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-25 14:28:42 +00:00
emit_x64_vector_floating_point: Add fpcr_controlled argument to all IR instructions
This commit is contained in:
@@ -2318,12 +2318,12 @@ U128 IREmitter::FPVectorAdd(size_t esize, const U128& a, const U128& b, bool fpc
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorDiv(size_t esize, const U128& a, const U128& b) {
|
||||
U128 IREmitter::FPVectorDiv(size_t esize, const U128& a, const U128& b, bool fpcr_controlled) {
|
||||
switch (esize) {
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorDiv32, a, b);
|
||||
return Inst<U128>(Opcode::FPVectorDiv32, a, b, Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorDiv64, a, b);
|
||||
return Inst<U128>(Opcode::FPVectorDiv64, a, b, Imm1(fpcr_controlled));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
@@ -2340,24 +2340,24 @@ U128 IREmitter::FPVectorEqual(size_t esize, const U128& a, const U128& b, bool f
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorFromSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding) {
|
||||
U128 IREmitter::FPVectorFromSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled) {
|
||||
ASSERT(fbits <= esize);
|
||||
switch (esize) {
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorFromSignedFixed32, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)));
|
||||
return Inst<U128>(Opcode::FPVectorFromSignedFixed32, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)), Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorFromSignedFixed64, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)));
|
||||
return Inst<U128>(Opcode::FPVectorFromSignedFixed64, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)), Imm1(fpcr_controlled));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorFromUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding) {
|
||||
U128 IREmitter::FPVectorFromUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled) {
|
||||
ASSERT(fbits <= esize);
|
||||
switch (esize) {
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorFromUnsignedFixed32, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)));
|
||||
return Inst<U128>(Opcode::FPVectorFromUnsignedFixed32, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)), Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorFromUnsignedFixed64, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)));
|
||||
return Inst<U128>(Opcode::FPVectorFromUnsignedFixed64, a, Imm8(static_cast<u8>(fbits)), Imm8(static_cast<u8>(rounding)), Imm1(fpcr_controlled));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
@@ -2412,24 +2412,24 @@ U128 IREmitter::FPVectorMul(size_t esize, const U128& a, const U128& b, bool fpc
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorMulAdd(size_t esize, const U128& a, const U128& b, const U128& c) {
|
||||
U128 IREmitter::FPVectorMulAdd(size_t esize, const U128& a, const U128& b, const U128& c, bool fpcr_controlled) {
|
||||
switch (esize) {
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::FPVectorMulAdd16, a, b, c);
|
||||
return Inst<U128>(Opcode::FPVectorMulAdd16, a, b, c, Imm1(fpcr_controlled));
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorMulAdd32, a, b, c);
|
||||
return Inst<U128>(Opcode::FPVectorMulAdd32, a, b, c, Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorMulAdd64, a, b, c);
|
||||
return Inst<U128>(Opcode::FPVectorMulAdd64, a, b, c, Imm1(fpcr_controlled));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorMulX(size_t esize, const U128& a, const U128& b) {
|
||||
U128 IREmitter::FPVectorMulX(size_t esize, const U128& a, const U128& b, bool fpcr_controlled) {
|
||||
switch (esize) {
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorMulX32, a, b);
|
||||
return Inst<U128>(Opcode::FPVectorMulX32, a, b, Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorMulX64, a, b);
|
||||
return Inst<U128>(Opcode::FPVectorMulX64, a, b, Imm1(fpcr_controlled));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
@@ -2490,17 +2490,17 @@ U128 IREmitter::FPVectorRecipStepFused(size_t esize, const U128& a, const U128&
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorRoundInt(size_t esize, const U128& operand, FP::RoundingMode rounding, bool exact) {
|
||||
U128 IREmitter::FPVectorRoundInt(size_t esize, const U128& operand, FP::RoundingMode rounding, bool exact, bool fpcr_controlled) {
|
||||
const IR::U8 rounding_imm = Imm8(static_cast<u8>(rounding));
|
||||
const IR::U1 exact_imm = Imm1(exact);
|
||||
|
||||
switch (esize) {
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::FPVectorRoundInt16, operand, rounding_imm, exact_imm);
|
||||
return Inst<U128>(Opcode::FPVectorRoundInt16, operand, rounding_imm, exact_imm, Imm1(fpcr_controlled));
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorRoundInt32, operand, rounding_imm, exact_imm);
|
||||
return Inst<U128>(Opcode::FPVectorRoundInt32, operand, rounding_imm, exact_imm, Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorRoundInt64, operand, rounding_imm, exact_imm);
|
||||
return Inst<U128>(Opcode::FPVectorRoundInt64, operand, rounding_imm, exact_imm, Imm1(fpcr_controlled));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
@@ -2529,12 +2529,12 @@ U128 IREmitter::FPVectorRSqrtStepFused(size_t esize, const U128& a, const U128&
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorSqrt(size_t esize, const U128& a) {
|
||||
U128 IREmitter::FPVectorSqrt(size_t esize, const U128& a, bool fpcr_controlled) {
|
||||
switch (esize) {
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorSqrt32, a);
|
||||
return Inst<U128>(Opcode::FPVectorSqrt32, a, Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorSqrt64, a);
|
||||
return Inst<U128>(Opcode::FPVectorSqrt64, a, Imm1(fpcr_controlled));
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
@@ -2549,7 +2549,7 @@ U128 IREmitter::FPVectorSub(size_t esize, const U128& a, const U128& b, bool fpc
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorToSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding) {
|
||||
U128 IREmitter::FPVectorToSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled) {
|
||||
ASSERT(fbits <= esize);
|
||||
|
||||
const U8 fbits_imm = Imm8(static_cast<u8>(fbits));
|
||||
@@ -2557,17 +2557,17 @@ U128 IREmitter::FPVectorToSignedFixed(size_t esize, const U128& a, size_t fbits,
|
||||
|
||||
switch (esize) {
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::FPVectorToSignedFixed16, a, fbits_imm, rounding_imm);
|
||||
return Inst<U128>(Opcode::FPVectorToSignedFixed16, a, fbits_imm, rounding_imm, Imm1(fpcr_controlled));
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorToSignedFixed32, a, fbits_imm, rounding_imm);
|
||||
return Inst<U128>(Opcode::FPVectorToSignedFixed32, a, fbits_imm, rounding_imm, Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorToSignedFixed64, a, fbits_imm, rounding_imm);
|
||||
return Inst<U128>(Opcode::FPVectorToSignedFixed64, a, fbits_imm, rounding_imm, Imm1(fpcr_controlled));
|
||||
}
|
||||
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
U128 IREmitter::FPVectorToUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding) {
|
||||
U128 IREmitter::FPVectorToUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled) {
|
||||
ASSERT(fbits <= esize);
|
||||
|
||||
const U8 fbits_imm = Imm8(static_cast<u8>(fbits));
|
||||
@@ -2575,11 +2575,11 @@ U128 IREmitter::FPVectorToUnsignedFixed(size_t esize, const U128& a, size_t fbit
|
||||
|
||||
switch (esize) {
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::FPVectorToUnsignedFixed16, a, fbits_imm, rounding_imm);
|
||||
return Inst<U128>(Opcode::FPVectorToUnsignedFixed16, a, fbits_imm, rounding_imm, Imm1(fpcr_controlled));
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::FPVectorToUnsignedFixed32, a, fbits_imm, rounding_imm);
|
||||
return Inst<U128>(Opcode::FPVectorToUnsignedFixed32, a, fbits_imm, rounding_imm, Imm1(fpcr_controlled));
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::FPVectorToUnsignedFixed64, a, fbits_imm, rounding_imm);
|
||||
return Inst<U128>(Opcode::FPVectorToUnsignedFixed64, a, fbits_imm, rounding_imm, Imm1(fpcr_controlled));
|
||||
}
|
||||
|
||||
UNREACHABLE();
|
||||
|
||||
@@ -349,29 +349,29 @@ public:
|
||||
|
||||
U128 FPVectorAbs(size_t esize, const U128& a);
|
||||
U128 FPVectorAdd(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorDiv(size_t esize, const U128& a, const U128& b);
|
||||
U128 FPVectorDiv(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorEqual(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorFromSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding);
|
||||
U128 FPVectorFromUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding);
|
||||
U128 FPVectorFromSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled = true);
|
||||
U128 FPVectorFromUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled = true);
|
||||
U128 FPVectorGreater(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorGreaterEqual(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorMax(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorMin(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorMul(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorMulAdd(size_t esize, const U128& addend, const U128& op1, const U128& op2);
|
||||
U128 FPVectorMulX(size_t esize, const U128& a, const U128& b);
|
||||
U128 FPVectorMulAdd(size_t esize, const U128& addend, const U128& op1, const U128& op2, bool fpcr_controlled = true);
|
||||
U128 FPVectorMulX(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorNeg(size_t esize, const U128& a);
|
||||
U128 FPVectorPairedAdd(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorPairedAddLower(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorRecipEstimate(size_t esize, const U128& a, bool fpcr_controlled = true);
|
||||
U128 FPVectorRecipStepFused(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorRoundInt(size_t esize, const U128& operand, FP::RoundingMode rounding, bool exact);
|
||||
U128 FPVectorRoundInt(size_t esize, const U128& operand, FP::RoundingMode rounding, bool exact, bool fpcr_controlled = true);
|
||||
U128 FPVectorRSqrtEstimate(size_t esize, const U128& a, bool fpcr_controlled = true);
|
||||
U128 FPVectorRSqrtStepFused(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorSqrt(size_t esize, const U128& a);
|
||||
U128 FPVectorSqrt(size_t esize, const U128& a, bool fpcr_controlled = true);
|
||||
U128 FPVectorSub(size_t esize, const U128& a, const U128& b, bool fpcr_controlled = true);
|
||||
U128 FPVectorToSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding);
|
||||
U128 FPVectorToUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding);
|
||||
U128 FPVectorToSignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled = true);
|
||||
U128 FPVectorToUnsignedFixed(size_t esize, const U128& a, size_t fbits, FP::RoundingMode rounding, bool fpcr_controlled = true);
|
||||
|
||||
void Breakpoint();
|
||||
|
||||
|
||||
@@ -587,15 +587,15 @@ OPCODE(FPVectorAbs32, U128, U128
|
||||
OPCODE(FPVectorAbs64, U128, U128 )
|
||||
OPCODE(FPVectorAdd32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorAdd64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorDiv32, U128, U128, U128 )
|
||||
OPCODE(FPVectorDiv64, U128, U128, U128 )
|
||||
OPCODE(FPVectorDiv32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorDiv64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorEqual16, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorEqual32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorEqual64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorFromSignedFixed32, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorFromSignedFixed64, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorFromUnsignedFixed32, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorFromUnsignedFixed64, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorFromSignedFixed32, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorFromSignedFixed64, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorFromUnsignedFixed32, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorFromUnsignedFixed64, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorGreater32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorGreater64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorGreaterEqual32, U128, U128, U128, U1 )
|
||||
@@ -606,11 +606,11 @@ OPCODE(FPVectorMin32, U128, U128
|
||||
OPCODE(FPVectorMin64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorMul32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorMul64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorMulAdd16, U128, U128, U128, U128 )
|
||||
OPCODE(FPVectorMulAdd32, U128, U128, U128, U128 )
|
||||
OPCODE(FPVectorMulAdd64, U128, U128, U128, U128 )
|
||||
OPCODE(FPVectorMulX32, U128, U128, U128 )
|
||||
OPCODE(FPVectorMulX64, U128, U128, U128 )
|
||||
OPCODE(FPVectorMulAdd16, U128, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorMulAdd32, U128, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorMulAdd64, U128, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorMulX32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorMulX64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorNeg16, U128, U128 )
|
||||
OPCODE(FPVectorNeg32, U128, U128 )
|
||||
OPCODE(FPVectorNeg64, U128, U128 )
|
||||
@@ -624,25 +624,25 @@ OPCODE(FPVectorRecipEstimate64, U128, U128
|
||||
OPCODE(FPVectorRecipStepFused16, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorRecipStepFused32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorRecipStepFused64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorRoundInt16, U128, U128, U8, U1 )
|
||||
OPCODE(FPVectorRoundInt32, U128, U128, U8, U1 )
|
||||
OPCODE(FPVectorRoundInt64, U128, U128, U8, U1 )
|
||||
OPCODE(FPVectorRoundInt16, U128, U128, U8, U1, U1 )
|
||||
OPCODE(FPVectorRoundInt32, U128, U128, U8, U1, U1 )
|
||||
OPCODE(FPVectorRoundInt64, U128, U128, U8, U1, U1 )
|
||||
OPCODE(FPVectorRSqrtEstimate16, U128, U128, U1 )
|
||||
OPCODE(FPVectorRSqrtEstimate32, U128, U128, U1 )
|
||||
OPCODE(FPVectorRSqrtEstimate64, U128, U128, U1 )
|
||||
OPCODE(FPVectorRSqrtStepFused16, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorRSqrtStepFused32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorRSqrtStepFused64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorSqrt32, U128, U128 )
|
||||
OPCODE(FPVectorSqrt64, U128, U128 )
|
||||
OPCODE(FPVectorSqrt32, U128, U128, U1 )
|
||||
OPCODE(FPVectorSqrt64, U128, U128, U1 )
|
||||
OPCODE(FPVectorSub32, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorSub64, U128, U128, U128, U1 )
|
||||
OPCODE(FPVectorToSignedFixed16, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorToSignedFixed32, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorToSignedFixed64, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorToUnsignedFixed16, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorToUnsignedFixed32, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorToUnsignedFixed64, U128, U128, U8, U8 )
|
||||
OPCODE(FPVectorToSignedFixed16, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorToSignedFixed32, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorToSignedFixed64, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorToUnsignedFixed16, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorToUnsignedFixed32, U128, U128, U8, U8, U1 )
|
||||
OPCODE(FPVectorToUnsignedFixed64, U128, U128, U8, U8, U1 )
|
||||
|
||||
// A32 Memory access
|
||||
A32OPC(ClearExclusive, Void, )
|
||||
|
||||
Reference in New Issue
Block a user