glasm: Implement int64 add and subtract

This commit is contained in:
ReinUsesLisp 2021-05-23 20:16:09 -03:00 committed by ameerj
parent 90e2710052
commit 46edc93371
2 changed files with 6 additions and 8 deletions

View file

@ -37,18 +37,16 @@ void EmitIAdd32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) {
}
}
void EmitIAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register a,
[[maybe_unused]] Register b) {
throw NotImplementedException("GLASM instruction");
void EmitIAdd64(EmitContext& ctx, IR::Inst& inst, Register a, Register b) {
ctx.LongAdd("ADD.S64 {}.x,{}.x,{}.x;", inst, a, b);
}
void EmitISub32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) {
ctx.Add("SUB.S {}.x,{},{};", inst, a, b);
}
void EmitISub64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Register a,
[[maybe_unused]] Register b) {
throw NotImplementedException("GLASM instruction");
void EmitISub64(EmitContext& ctx, IR::Inst& inst, Register a, Register b) {
ctx.LongAdd("SUB.S64 {}.x,{}.x,{}.x;", inst, a, b);
}
void EmitIMul32(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) {