summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-19 17:09:29 -0300
committerGravatar ameerj2021-07-22 21:51:32 -0400
commit291f220be37d5fed36906b4fce977a5e4e23f481 (patch)
tree57921282aa52ffd16dc8b009bd5a3a2abc6d12b5 /src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp
parentglasm: Implement barriers (diff)
downloadyuzu-291f220be37d5fed36906b4fce977a5e4e23f481.tar.gz
yuzu-291f220be37d5fed36906b4fce977a5e4e23f481.tar.xz
yuzu-291f220be37d5fed36906b4fce977a5e4e23f481.zip
glasm: Implement 64-bit shifts
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp
index ff353df8d..f75fcba47 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp
@@ -75,27 +75,27 @@ void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, Sc
75 ctx.Add("SHL.U {}.x,{},{};", inst, base, shift); 75 ctx.Add("SHL.U {}.x,{},{};", inst, base, shift);
76} 76}
77 77
78void EmitShiftLeftLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register base, 78void EmitShiftLeftLogical64(EmitContext& ctx, IR::Inst& inst, ScalarRegister base,
79 [[maybe_unused]] Register shift) { 79 ScalarU32 shift) {
80 throw NotImplementedException("GLASM instruction"); 80 ctx.LongAdd("SHL.U64 {}.x,{},{};", inst, base, shift);
81} 81}
82 82
83void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift) { 83void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift) {
84 ctx.Add("SHR.U {}.x,{},{};", inst, base, shift); 84 ctx.Add("SHR.U {}.x,{},{};", inst, base, shift);
85} 85}
86 86
87void EmitShiftRightLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register base, 87void EmitShiftRightLogical64(EmitContext& ctx, IR::Inst& inst, ScalarRegister base,
88 [[maybe_unused]] Register shift) { 88 ScalarU32 shift) {
89 throw NotImplementedException("GLASM instruction"); 89 ctx.LongAdd("SHR.U64 {}.x,{},{};", inst, base, shift);
90} 90}
91 91
92void EmitShiftRightArithmetic32(EmitContext& ctx, IR::Inst& inst, ScalarS32 base, ScalarS32 shift) { 92void EmitShiftRightArithmetic32(EmitContext& ctx, IR::Inst& inst, ScalarS32 base, ScalarS32 shift) {
93 ctx.Add("SHR.S {}.x,{},{};", inst, base, shift); 93 ctx.Add("SHR.S {}.x,{},{};", inst, base, shift);
94} 94}
95 95
96void EmitShiftRightArithmetic64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register base, 96void EmitShiftRightArithmetic64(EmitContext& ctx, IR::Inst& inst, ScalarRegister base,
97 [[maybe_unused]] Register shift) { 97 ScalarS32 shift) {
98 throw NotImplementedException("GLASM instruction"); 98 ctx.LongAdd("SHR.S64 {}.x,{},{};", inst, base, shift);
99} 99}
100 100
101void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { 101void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) {