예제 #1
0
        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}");
        }
예제 #2
0
        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());
        }
예제 #3
0
 public void G(DoubleArgCmd cmd, AsmArg lhs, string rhs)
 {
     _out.WriteLine($"{cmd.ToString().ToLowerInvariant()} {lhs.Val}, {rhs}");
 }
예제 #4
0
 public void G(DoubleArgCmd cmd, int lhs, int rhs)
 {
     _out.WriteLine($"{cmd.ToString().ToLowerInvariant()} {lhs.ToString()}, {rhs.ToString()}");
 }