diff options
| author | 2021-12-05 16:58:18 -0500 | |
|---|---|---|
| committer | 2021-12-05 18:11:19 -0500 | |
| commit | 1e1f7b32341f6538fce07d0df415a4d494a2b209 (patch) | |
| tree | 4c19b5ce70e2bf75527b08966e6b2ebc8aa0b48c /src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp | |
| parent | shader_recompiler: Adjust emit_context includes (diff) | |
| download | yuzu-1e1f7b32341f6538fce07d0df415a4d494a2b209.tar.gz yuzu-1e1f7b32341f6538fce07d0df415a4d494a2b209.tar.xz yuzu-1e1f7b32341f6538fce07d0df415a4d494a2b209.zip | |
glasm: Move implemented instructions from not_implemented.cpp
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp index e69de29bb..eed7bfec2 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp | |||
| @@ -0,0 +1,26 @@ | |||
| 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 "shader_recompiler/backend/glasm/emit_glasm_instructions.h" | ||
| 6 | #include "shader_recompiler/backend/glasm/glasm_emit_context.h" | ||
| 7 | |||
| 8 | namespace Shader::Backend::GLASM { | ||
| 9 | |||
| 10 | void EmitLogicalOr(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { | ||
| 11 | ctx.Add("OR.S {},{},{};", inst, a, b); | ||
| 12 | } | ||
| 13 | |||
| 14 | void EmitLogicalAnd(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { | ||
| 15 | ctx.Add("AND.S {},{},{};", inst, a, b); | ||
| 16 | } | ||
| 17 | |||
| 18 | void EmitLogicalXor(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { | ||
| 19 | ctx.Add("XOR.S {},{},{};", inst, a, b); | ||
| 20 | } | ||
| 21 | |||
| 22 | void EmitLogicalNot(EmitContext& ctx, IR::Inst& inst, ScalarS32 value) { | ||
| 23 | ctx.Add("SEQ.S {},{},0;", inst, value); | ||
| 24 | } | ||
| 25 | |||
| 26 | } // namespace Shader::Backend::GLASM | ||