aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-11-06 09:41:23 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-11-06 09:41:23 +0800
commit9d275a8694885b359e230424fa957c6b194e9030 (patch)
treee80da89d6bf875cc3b1240dbedb8386f882336e1
parent9977ab4c6761cfa6419f07055a6c47b3ed0be6bc (diff)
downloadtangerine-mcl-9d275a8694885b359e230424fa957c6b194e9030.tar.gz
tangerine-mcl-9d275a8694885b359e230424fa957c6b194e9030.tar.zst
tangerine-mcl-9d275a8694885b359e230424fa957c6b194e9030.zip
add Fp2::sub for bls12
-rw-r--r--src/fp_generator.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fp_generator.hpp b/src/fp_generator.hpp
index 4d45725..22692f3 100644
--- a/src/fp_generator.hpp
+++ b/src/fp_generator.hpp
@@ -3523,6 +3523,17 @@ private:
vmovq(px, xm0);
gen_raw_fp_add6(pz, px, py, FpByte_, t1, t2, false);
}
+ void gen_fp2_sub6()
+ {
+ StackFrame sf(this, 3, 5);
+ const Reg64& pz = sf.p[0];
+ const Reg64& px = sf.p[1];
+ const Reg64& py = sf.p[2];
+ Pack t = sf.t;
+ t.append(rax);
+ gen_raw_fp_sub6(pz, px, py, 0, t, false);
+ gen_raw_fp_sub6(pz, px, py, FpByte_, t, false);
+ }
void3u gen_fp2_add()
{
align(16);
@@ -3545,6 +3556,10 @@ private:
gen_fp2_sub4();
return func;
}
+ if (pn_ == 6 && !isFullBit_) {
+ gen_fp2_sub6();
+ return func;
+ }
return 0;
}
void gen_fp2_sub4()