mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
glasm: Add MUFU instructions to GLASM
This commit is contained in:
parent
5b18a12df2
commit
decda4a2c7
|
@ -125,40 +125,41 @@ void EmitFPNeg64(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||||
ctx.LongAdd("MOV.F64 {}.x,-{};", inst, value);
|
ctx.LongAdd("MOV.F64 {}.x,-{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPSin([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
|
void EmitFPSin(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("SIN {}.x,{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPCos([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
|
void EmitFPCos(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("COS {}.x,{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPExp2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
|
void EmitFPExp2(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("EX2 {}.x,{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPLog2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
|
void EmitFPLog2(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("LG2 {}.x,{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPRecip32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
|
void EmitFPRecip32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("RCP {}.x,{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPRecip64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
void EmitFPRecip64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
throw NotImplementedException("GLASM instruction");
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPRecipSqrt32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
|
void EmitFPRecipSqrt32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("RSQ {}.x,{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPRecipSqrt64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
void EmitFPRecipSqrt64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
throw NotImplementedException("GLASM instruction");
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPSqrt([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
|
void EmitFPSqrt(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
const Register ret{ctx.reg_alloc.Define(inst)};
|
||||||
|
ctx.Add("RSQ {}.x,{};RCP {}.x,{}.x;", ret, value, ret, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitFPSaturate16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
void EmitFPSaturate16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
||||||
|
|
|
@ -232,15 +232,15 @@ void EmitFPMul64(EmitContext& ctx, IR::Inst& inst, ScalarF64 a, ScalarF64 b);
|
||||||
void EmitFPNeg16(EmitContext& ctx, Register value);
|
void EmitFPNeg16(EmitContext& ctx, Register value);
|
||||||
void EmitFPNeg32(EmitContext& ctx, IR::Inst& inst, ScalarRegister value);
|
void EmitFPNeg32(EmitContext& ctx, IR::Inst& inst, ScalarRegister value);
|
||||||
void EmitFPNeg64(EmitContext& ctx, IR::Inst& inst, Register value);
|
void EmitFPNeg64(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||||
void EmitFPSin(EmitContext& ctx, ScalarF32 value);
|
void EmitFPSin(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPCos(EmitContext& ctx, ScalarF32 value);
|
void EmitFPCos(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPExp2(EmitContext& ctx, ScalarF32 value);
|
void EmitFPExp2(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPLog2(EmitContext& ctx, ScalarF32 value);
|
void EmitFPLog2(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPRecip32(EmitContext& ctx, ScalarF32 value);
|
void EmitFPRecip32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPRecip64(EmitContext& ctx, Register value);
|
void EmitFPRecip64(EmitContext& ctx, Register value);
|
||||||
void EmitFPRecipSqrt32(EmitContext& ctx, ScalarF32 value);
|
void EmitFPRecipSqrt32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPRecipSqrt64(EmitContext& ctx, Register value);
|
void EmitFPRecipSqrt64(EmitContext& ctx, Register value);
|
||||||
void EmitFPSqrt(EmitContext& ctx, ScalarF32 value);
|
void EmitFPSqrt(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPSaturate16(EmitContext& ctx, Register value);
|
void EmitFPSaturate16(EmitContext& ctx, Register value);
|
||||||
void EmitFPSaturate32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
void EmitFPSaturate32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value);
|
||||||
void EmitFPSaturate64(EmitContext& ctx, Register value);
|
void EmitFPSaturate64(EmitContext& ctx, Register value);
|
||||||
|
|
Loading…
Reference in a new issue