Add Sub64 opcode

This commit is contained in:
Tillmann Karras 2016-08-06 06:09:47 +01:00
parent b9f4f1ed0f
commit 846d07d7b5
4 changed files with 16 additions and 0 deletions

View file

@ -845,6 +845,16 @@ void EmitX64::EmitSubWithCarry(IR::Block& block, IR::Inst* inst) {
}
}
void EmitX64::EmitSub64(IR::Block& block, IR::Inst* inst) {
IR::Value a = inst->GetArg(0);
IR::Value b = inst->GetArg(1);
X64Reg result = reg_alloc.UseDefRegister(a, inst, any_gpr);
OpArg op_arg = reg_alloc.UseOpArg(b, any_gpr);
code->SUB(64, R(result), op_arg);
}
void EmitX64::EmitMul(IR::Block&, IR::Inst* inst) {
IR::Value a = inst->GetArg(0);
IR::Value b = inst->GetArg(1);