aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-10-15 14:23:23 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-10-15 14:23:23 +0800
commitc826896b4f5e925da1f8e11385b3e6e7d2f9bb2c (patch)
treee6cacc97f65b15aec9ea563650f008d2609cc73c
parentce3a03692e2ef459a1f29be8736286399b662763 (diff)
downloaddexon-mcl-c826896b4f5e925da1f8e11385b3e6e7d2f9bb2c.tar.gz
dexon-mcl-c826896b4f5e925da1f8e11385b3e6e7d2f9bb2c.tar.zst
dexon-mcl-c826896b4f5e925da1f8e11385b3e6e7d2f9bb2c.zip
disable mulUnit_
-rw-r--r--src/fp_generator.hpp10
-rw-r--r--test/fp_generator_test.cpp4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/fp_generator.hpp b/src/fp_generator.hpp
index 84279e3..e4cbba0 100644
--- a/src/fp_generator.hpp
+++ b/src/fp_generator.hpp
@@ -212,7 +212,7 @@ struct FpGenerator : Xbyak::CodeGenerator {
// preInv
typedef int (*int2op)(uint64_t*, const uint64_t*);
void4u mul_;
- uint3opI mulUnit_;
+// uint3opI mulUnit_;
/*
@param op [in] ; use op.p, op.N, op.isFullBit
@@ -248,7 +248,7 @@ struct FpGenerator : Xbyak::CodeGenerator {
, pn_(0)
, FpByte_(0)
, mul_(0)
- , mulUnit_(0)
+// , mulUnit_(0)
{
useMulx_ = cpu_.has(Xbyak::util::Cpu::tBMI2);
useAdx_ = cpu_.has(Xbyak::util::Cpu::tADX);
@@ -299,9 +299,9 @@ private:
gen_fp_neg();
if (op.N > 4) return;
- align(16);
- mulUnit_ = getCurr<uint3opI>();
- gen_mulUnit();
+// align(16);
+// mulUnit_ = getCurr<uint3opI>();
+// gen_mulUnit();
align(16);
op.fp_mul = getCurr<void4u>(); // used in toMont/fromMont
op.fp_mulA_ = getCurr<void3u>();
diff --git a/test/fp_generator_test.cpp b/test/fp_generator_test.cpp
index 6edee91..60ec5cd 100644
--- a/test/fp_generator_test.cpp
+++ b/test/fp_generator_test.cpp
@@ -138,6 +138,7 @@ void testNeg(const mcl::fp::Op& op)
}
}
+#if 0
void testMulI(const mcl::fp::FpGenerator& fg, int pn)
{
cybozu::XorShift rg;
@@ -165,6 +166,7 @@ void testMulI(const mcl::fp::FpGenerator& fg, int pn)
CYBOZU_BENCH_C("mulUnit", 10000000, fg.mulUnit_, z, x, y);
}
}
+#endif
void testShr1(const mcl::fp::Op& op, int pn)
{
@@ -191,7 +193,7 @@ void test(const char *pStr)
const int pn = (int)op.N;
testAddSub(op);
testNeg(op);
- testMulI(*op.fg, pn);
+// testMulI(*op.fg, pn);
testShr1(op, pn);
}