aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-12-07 18:27:50 -0500
committerGitHub <noreply@github.com>2021-12-07 18:27:50 -0500
commitedbde7a2204cddaa48c2964eb66198639d17db2f (patch)
treecfcfa1e39ab647e96c53541fc47c762e42d4f1fe /src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp
parent00f65af8b2e85eec1535e06c6125ae2751b14085 (diff)
parent7105204a7ed0ac45701e57ff157c9e0c679c5ce9 (diff)
Merge pull request #7522 from ameerj/shader-recompiler-filenames
shader_recompiler/backend: Minor organization and refactoring to reduce compile time overhead
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp
index e69de29bb..875e9d991 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp
@@ -0,0 +1,30 @@
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "shader_recompiler/backend/glasm/emit_glasm_instructions.h"
+#include "shader_recompiler/backend/glasm/glasm_emit_context.h"
+
+namespace Shader::Backend::GLASM {
+
+void EmitUndefU1(EmitContext& ctx, IR::Inst& inst) {
+ ctx.Add("MOV.S {}.x,0;", inst);
+}
+
+void EmitUndefU8(EmitContext& ctx, IR::Inst& inst) {
+ ctx.Add("MOV.S {}.x,0;", inst);
+}
+
+void EmitUndefU16(EmitContext& ctx, IR::Inst& inst) {
+ ctx.Add("MOV.S {}.x,0;", inst);
+}
+
+void EmitUndefU32(EmitContext& ctx, IR::Inst& inst) {
+ ctx.Add("MOV.S {}.x,0;", inst);
+}
+
+void EmitUndefU64(EmitContext& ctx, IR::Inst& inst) {
+ ctx.LongAdd("MOV.S64 {}.x,0;", inst);
+}
+
+} // namespace Shader::Backend::GLASM