diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-29 07:36:39 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-29 07:36:39 +0800 |
commit | 4400b61efbe0ec8f2e7f4abedcd7c48bf39da7af (patch) | |
tree | 92c65968f93e0a0cd75da2ab88cca781649d6d68 /src | |
parent | 0e5eed96e05e76f892bec857e63166e3e503c50c (diff) | |
download | tangerine-mcl-4400b61efbe0ec8f2e7f4abedcd7c48bf39da7af.tar.gz tangerine-mcl-4400b61efbe0ec8f2e7f4abedcd7c48bf39da7af.tar.zst tangerine-mcl-4400b61efbe0ec8f2e7f4abedcd7c48bf39da7af.zip |
change spec of copyAndMask
Diffstat (limited to 'src')
-rw-r--r-- | src/fp.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -607,7 +607,10 @@ void copyAndMask(Unit *y, const void *x, size_t xByteSize, const Op& op, bool do if (isGreaterOrEqualArray(y, op.p, op.N)) throw cybozu::Exception("fp:copyAndMask:large x"); return; } - maskArray(y, op.N, op.bitSize - 1); + maskArray(y, op.N, op.bitSize); + if (isGreaterOrEqualArray(y, op.p, op.N)) { + maskArray(y, op.N, op.bitSize - 1); + } assert(isLessArray(y, op.p, op.N)); } |