mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
glasm: Implement IAbs64 and INeg64 on GLASM
This commit is contained in:
parent
3b6a632237
commit
5b18a12df2
|
@ -306,9 +306,9 @@ void EmitISub32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b);
|
||||||
void EmitISub64(EmitContext& ctx, Register a, Register b);
|
void EmitISub64(EmitContext& ctx, Register a, Register b);
|
||||||
void EmitIMul32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b);
|
void EmitIMul32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b);
|
||||||
void EmitINeg32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value);
|
void EmitINeg32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value);
|
||||||
void EmitINeg64(EmitContext& ctx, Register value);
|
void EmitINeg64(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||||
void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value);
|
void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value);
|
||||||
void EmitIAbs64(EmitContext& ctx, Register value);
|
void EmitIAbs64(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||||
void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift);
|
void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift);
|
||||||
void EmitShiftLeftLogical64(EmitContext& ctx, Register base, Register shift);
|
void EmitShiftLeftLogical64(EmitContext& ctx, Register base, Register shift);
|
||||||
void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift);
|
void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift);
|
||||||
|
|
|
@ -34,16 +34,16 @@ void EmitINeg32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value) {
|
||||||
ctx.Add("MOV.S {},-{};", inst, value);
|
ctx.Add("MOV.S {},-{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitINeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
void EmitINeg64(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.LongAdd("MOV.S64 {},-{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value) {
|
void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, ScalarS32 value) {
|
||||||
ctx.Add("ABS.S {},{};", inst, value);
|
ctx.Add("ABS.S {},{};", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitIAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register value) {
|
void EmitIAbs64(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.LongAdd("MOV.S64 {},|{}|;", inst, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift) {
|
void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst& inst, ScalarU32 base, ScalarU32 shift) {
|
||||||
|
|
Loading…
Reference in a new issue