public void G(DoubleArgCmd cmd, AsmArg lhs, double rhs) { var rhsDoubleVal = rhs.ToString(CultureInfo.InvariantCulture); var dot = rhsDoubleVal.Contains('.') ? "" : "."; _out.WriteLine($"{cmd.ToString().ToLowerInvariant()} {lhs.Val}, {rhsDoubleVal}{dot}"); }
public void CmpDoubles(DoubleArgCmd cmpCmd, bool inverseArguments = false) { G(Pop, Rax()); G(Movq, inverseArguments ? Xmm0() : Xmm1(), Rax()); G(Pop, Rax()); G(Movq, inverseArguments ? Xmm1() : Xmm0(), Rax()); G(cmpCmd, Xmm0(), Xmm1()); G(Movq, Rax(), Xmm0()); G(And, Rax(), 1); G(Push, Rax()); }
public void G(DoubleArgCmd cmd, AsmArg lhs, string rhs) { _out.WriteLine($"{cmd.ToString().ToLowerInvariant()} {lhs.Val}, {rhs}"); }
public void G(DoubleArgCmd cmd, int lhs, int rhs) { _out.WriteLine($"{cmd.ToString().ToLowerInvariant()} {lhs.ToString()}, {rhs.ToString()}"); }