diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_instructions.h | 8 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp | 18 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h index 119b166af..94e545ad4 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h +++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h | |||
| @@ -308,11 +308,13 @@ void EmitINeg64(EmitContext& ctx, IR::Inst& inst, Register value); | |||
| 308 | void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value); | 308 | void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value); |
| 309 | void EmitIAbs64(EmitContext& ctx, IR::Inst& inst, Register value); | 309 | void EmitIAbs64(EmitContext& ctx, IR::Inst& inst, Register value); |
| 310 | void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift); | 310 | void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift); |
| 311 | void EmitShiftLeftLogical64(EmitContext& ctx, Register base, Register shift); | 311 | void EmitShiftLeftLogical64(EmitContext& ctx, IR::Inst& inst, ScalarRegister base, ScalarU32 shift); |
| 312 | void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift); | 312 | void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift); |
| 313 | void EmitShiftRightLogical64(EmitContext& ctx, Register base, Register shift); | 313 | void EmitShiftRightLogical64(EmitContext& ctx, IR::Inst& inst, ScalarRegister base, |
| 314 | ScalarU32 shift); | ||
| 314 | void EmitShiftRightArithmetic32(EmitContext& ctx, IR::Inst& inst, ScalarS32 base, ScalarS32 shift); | 315 | void EmitShiftRightArithmetic32(EmitContext& ctx, IR::Inst& inst, ScalarS32 base, ScalarS32 shift); |
| 315 | void EmitShiftRightArithmetic64(EmitContext& ctx, Register base, Register shift); | 316 | void EmitShiftRightArithmetic64(EmitContext& ctx, IR::Inst& inst, ScalarRegister base, |
| 317 | ScalarS32 shift); | ||
| 316 | void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b); | 318 | void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b); |
| 317 | void EmitBitwiseOr32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b); | 319 | void EmitBitwiseOr32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b); |
| 318 | void EmitBitwiseXor32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b); | 320 | void EmitBitwiseXor32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b); |
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 | ||
| 78 | void EmitShiftLeftLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register base, | 78 | void 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 | ||
| 83 | void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift) { | 83 | void 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 | ||
| 87 | void EmitShiftRightLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register base, | 87 | void 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 | ||
| 92 | void EmitShiftRightArithmetic32(EmitContext& ctx, IR::Inst& inst, ScalarS32 base, ScalarS32 shift) { | 92 | void 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 | ||
| 96 | void EmitShiftRightArithmetic64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register base, | 96 | void 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 | ||
| 101 | void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { | 101 | void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { |