public override string Template() { return($"{LeftExpression.Template()}" + "\nmovq\t%rax,%rcx" + $"\n{RightExpression.Template()}" + $"\n{AssignmentTemplate}\t# assign {RightExpression} to {LeftExpression}" + $"\n{LeftExpression.Save()}"); }
public override string Template() { return($"{RightExpression.Template()}\nmovq\t%rax,%rbx\n{LeftExpression.Template()}\n{AssignmentTemplate}\n{LeftExpression.Save()}"); // var retrieve = $"\nmovq\t{varIndex}(%rbp),%rax"; // const string div = "\nidiv\t%rbx"; // var assign = $"\nmovq\t%rax,{varIndex}(%rbp)"; // // return $"{Expression.Template()}" + // "\nmovq\t%rax,%rbx" + // retrieve + // "\ncqo" + // div + // assign; }
public override string Template() { return($"{LeftExpression.Template()}\n{AssignmentTemplate}\n{LeftExpression.Save()}"); }
public override string Template() { return($"{RightExpression.Template()}\nmovq\t%rax,%rbx\n{LeftExpression.Template()}\n{AssignmentTemplate}\nmovq\t$0,%rax\nmovq\t%rdx,%rax\n{LeftExpression.Save()}"); }