summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_select.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_select.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp
index e69de29bb..636cbe8a0 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp
@@ -0,0 +1,50 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string_view>
6
7#include "shader_recompiler/backend/glasm/emit_context.h"
8#include "shader_recompiler/backend/glasm/emit_glasm_instructions.h"
9#include "shader_recompiler/frontend/ir/value.h"
10
11namespace Shader::Backend::GLASM {
12
13void EmitSelectU1(EmitContext&, std::string_view, std::string_view, std::string_view) {
14 throw NotImplementedException("GLASM instruction");
15}
16
17void EmitSelectU8(EmitContext&, std::string_view, std::string_view, std::string_view) {
18 throw NotImplementedException("GLASM instruction");
19}
20
21void EmitSelectU16(EmitContext&, std::string_view, std::string_view, std::string_view) {
22 throw NotImplementedException("GLASM instruction");
23}
24
25void EmitSelectU32(EmitContext& ctx, IR::Inst& inst, std::string_view cond,
26 std::string_view true_value, std::string_view false_value) {
27 ctx.Add("MOV.U.CC RC,{};", cond);
28 ctx.Add("IF NE.x;");
29 ctx.Add("MOV.U {},{};", inst, true_value);
30 ctx.Add("ELSE;");
31 ctx.Add("MOV.U {},{};", inst, false_value);
32 ctx.Add("ENDIF;");
33}
34
35void EmitSelectU64(EmitContext&, std::string_view, std::string_view, std::string_view) {
36 throw NotImplementedException("GLASM instruction");
37}
38
39void EmitSelectF16(EmitContext&, std::string_view, std::string_view, std::string_view) {
40 throw NotImplementedException("GLASM instruction");
41}
42
43void EmitSelectF32(EmitContext&, std::string_view, std::string_view, std::string_view) {
44 throw NotImplementedException("GLASM instruction");
45}
46
47void EmitSelectF64(EmitContext&, std::string_view, std::string_view, std::string_view) {
48 throw NotImplementedException("GLASM instruction");
49}
50} // namespace Shader::Backend::GLASM