summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-09 23:03:01 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:30 +0200
commit4502595bc2518eecf934110e9393b11bf0c2f75a (patch)
tree3e75e200936bce393152792b9ba90413ea83482c /src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
parentglasm: Implement GLASM fp16 packing and move bitwise insns (diff)
downloadyuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.gz
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.bz2
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.lz
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.xz
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.zst
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
index fed6503c6..2b9a210aa 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
@@ -10,7 +10,8 @@
namespace Shader::Backend::GLASM {
-void EmitFPAbs16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
+void EmitFPAbs16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
+ [[maybe_unused]] Register value) {
throw NotImplementedException("GLASM instruction");
}
@@ -18,8 +19,8 @@ void EmitFPAbs32(EmitContext& ctx, IR::Inst& inst, ScalarF32 value) {
ctx.Add("MOV.F {}.x,|{}|;", inst, value);
}
-void EmitFPAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
- throw NotImplementedException("GLASM instruction");
+void EmitFPAbs64(EmitContext& ctx, IR::Inst& inst, ScalarF64 value) {
+ ctx.LongAdd("MOV.F64 {}.x,|{}|;", inst, value);
}
void EmitFPAdd16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
@@ -31,9 +32,8 @@ void EmitFPAdd32(EmitContext& ctx, IR::Inst& inst, ScalarF32 a, ScalarF32 b) {
ctx.Add("ADD.F {}.x,{},{};", inst, a, b);
}
-void EmitFPAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
- [[maybe_unused]] Register a, [[maybe_unused]] Register b) {
- throw NotImplementedException("GLASM instruction");
+void EmitFPAdd64(EmitContext& ctx, IR::Inst& inst, ScalarF64 a, ScalarF64 b) {
+ ctx.LongAdd("ADD.F64 {}.x,{},{};", inst, a, b);
}
void EmitFPFma16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
@@ -94,8 +94,8 @@ void EmitFPNeg32(EmitContext& ctx, IR::Inst& inst, ScalarRegister value) {
ctx.Add("MOV.F {}.x,-{};", inst, value);
}
-void EmitFPNeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
- throw NotImplementedException("GLASM instruction");
+void EmitFPNeg64(EmitContext& ctx, IR::Inst& inst, Register value) {
+ ctx.LongAdd("MOV.F64 {}.x,-{};", inst, value);
}
void EmitFPSin([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {