github.com/cloudflare/circl@v1.5.0/ecc/fourq/point_amd64.h (about) 1 #define doubleLeg \ 2 _fqAdd(e,Px,Py) \ 3 _fqSqrLeg(a,Px) \ 4 _fqSqrLeg(b,Py) \ 5 _fqSqrLeg(c,Pz) \ 6 _fqAdd(c,c,c) \ 7 _fqAdd(d,a,b) \ 8 _fqSqrLeg(e,e) \ 9 _fqSub(e,e,d) \ 10 _fqSub(f,b,a) \ 11 _fqSub(g,c,f) \ 12 _fqMulLeg(Pz,f,g) \ 13 _fqMulLeg(Px,e,g) \ 14 _fqMulLeg(Py,d,f) 15 16 #define doubleBmi2 \ 17 _fqAdd(e,Px,Py) \ 18 _fqSqrBmi2(a,Px) \ 19 _fqSqrBmi2(b,Py) \ 20 _fqSqrBmi2(c,Pz) \ 21 _fqAdd(c,c,c) \ 22 _fqAdd(d,a,b) \ 23 _fqSqrBmi2(e,e) \ 24 _fqSub(e,e,d) \ 25 _fqSub(f,b,a) \ 26 _fqSub(g,c,f) \ 27 _fqMulBmi2(Pz,f,g) \ 28 _fqMulBmi2(Px,e,g) \ 29 _fqMulBmi2(Py,d,f) 30 31 #define addLeg \ 32 _fqMulLeg(c, Pta, Ptb) \ 33 _fqSub(h, b, a) \ 34 _fqAdd(b, b, a) \ 35 _fqMulLeg(a, h, subYX) \ 36 _fqMulLeg(b, b, addYX) \ 37 _fqSub(e, b, a) \ 38 _fqAdd(h, b, a) \ 39 _fqMulLeg(d, Pz, z2) \ 40 _fqMulLeg(c, c, dt2) \ 41 _fqSub(f, d, c) \ 42 _fqAdd(g, d, c) \ 43 _fqMulLeg(Pz, f, g) \ 44 _fqMulLeg(Px, e, f) \ 45 _fqMulLeg(Py, g, h) 46 47 #define addBmi2 \ 48 _fqMulBmi2(c, Pta, Ptb) \ 49 _fqSub(h, b, a) \ 50 _fqAdd(b, b, a) \ 51 _fqMulBmi2(a, h, subYX) \ 52 _fqMulBmi2(b, b, addYX) \ 53 _fqSub(e, b, a) \ 54 _fqAdd(h, b, a) \ 55 _fqMulBmi2(d, Pz, z2) \ 56 _fqMulBmi2(c, c, dt2) \ 57 _fqSub(f, d, c) \ 58 _fqAdd(g, d, c) \ 59 _fqMulBmi2(Pz, f, g) \ 60 _fqMulBmi2(Px, e, f) \ 61 _fqMulBmi2(Py, g, h) 62 63 #define mixAddLeg \ 64 _fqMulLeg(c, Pta, Ptb) \ 65 _fqSub(h, b, a) \ 66 _fqAdd(b, b, a) \ 67 _fqMulLeg(a, h, subYX) \ 68 _fqMulLeg(b, b, addYX) \ 69 _fqSub(e, b, a) \ 70 _fqAdd(h, b, a) \ 71 _fqAdd(d, Pz, Pz) \ 72 _fqMulLeg(c, c, dt2) \ 73 _fqSub(f, d, c) \ 74 _fqAdd(g, d, c) \ 75 _fqMulLeg(Pz, f, g) \ 76 _fqMulLeg(Px, e, f) \ 77 _fqMulLeg(Py, g, h) 78 79 #define mixAddBmi2 \ 80 _fqMulBmi2(c, Pta, Ptb) \ 81 _fqSub(h, b, a) \ 82 _fqAdd(b, b, a) \ 83 _fqMulBmi2(a, h, subYX) \ 84 _fqMulBmi2(b, b, addYX) \ 85 _fqSub(e, b, a) \ 86 _fqAdd(h, b, a) \ 87 _fqAdd(d, Pz, Pz) \ 88 _fqMulBmi2(c, c, dt2) \ 89 _fqSub(f, d, c) \ 90 _fqAdd(g, d, c) \ 91 _fqMulBmi2(Pz, f, g) \ 92 _fqMulBmi2(Px, e, f) \ 93 _fqMulBmi2(Py, g, h)