protected override void Compile(CodeContext c) { var a = c.XmmSs("a"); var b = c.XmmSs("b"); c.SetArgument(0, a); c.SetArgument(1, b); c.Addss(a, b); c.Ret(a); }
protected override void Compile(CodeContext c) { const int cnt = 7; var p = c.IntPtr("p"); var xv = new XmmVariable[cnt]; int i; for (i = 0; i < cnt; i++) { xv[i] = c.XmmSs("xv" + i); c.SetArgument(i, xv[i]); } c.SetArgument(7, p); c.Addss(xv[0], xv[1]); c.Addss(xv[0], xv[2]); c.Addss(xv[0], xv[3]); c.Addss(xv[0], xv[4]); c.Addss(xv[0], xv[5]); c.Addss(xv[0], xv[6]); c.Movss(Memory.Ptr(p), xv[0]); }