Skip to content

Commit 1568af3

Browse files
committed
mac compile fixes
1 parent 5ffb297 commit 1568af3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

libOTe/Dpf/RegularDpf.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ namespace osuCrypto
176176
static block tagBit(const block& b)
177177
{
178178
auto bit = b & block(0, 1);
179-
auto mask = _mm_sub_epi64(_mm_set1_epi64x(0), bit);
180-
return _mm_unpacklo_epi64(mask, mask);
179+
auto mask = block(0,0).sub_epi64(bit);
180+
return mask.unpacklo_epi64(mask);
181181
}
182182
};
183183

libOTe_Tests/OT_Tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ namespace tests_libOTe
254254
for (u64 i = 0; i < 10000; ++i)
255255
{
256256
transpose128(data.data());
257-
data[0] += block::allSame((u64)1);
257+
data[0] = data[0].add_epi64(block::allSame((u64)1));
258258
}
259259

260260
// Add a check just to make sure this doesn't get compiled out.

libOTe_Tests/Pprf_Tests.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ void Tools_Pprf_inter_test(const CLP& cmd)
382382
for (auto d : { 32,3242 }) for (auto n : { 8, 128 }) for (auto p : { true, false }) for (auto e : { true, false })
383383
{
384384
Tools_Pprf_test_impl<u64, u64, CoeffCtxInteger>(d, n, p, f, e, v);
385-
Tools_Pprf_test_impl<block, block, CoeffCtxInteger>(d, n, p, f, e, v);
385+
Tools_Pprf_test_impl<block, block, CoeffCtxGF2>(d, n, p, f, e, v);
386386
}
387387
}
388388

@@ -397,7 +397,7 @@ void Tools_Pprf_ByLeafIndex_test(const CLP& cmd)
397397
for (auto d : { 32,3242 }) for (auto n : { 8, 128 }) for (auto p : { true/*, false */}) for (auto e : { true/*, false */})
398398
{
399399
Tools_Pprf_test_impl<u64, u64, CoeffCtxInteger>(d, n, p, f, e, v);
400-
Tools_Pprf_test_impl<block, block, CoeffCtxInteger>(d, n, p, f, e, v);
400+
Tools_Pprf_test_impl<block, block, CoeffCtxGF2>(d, n, p, f, e, v);
401401
}
402402
#else
403403
throw UnitTestSkipped("ENABLE_SILENTOT not defined.");
@@ -416,7 +416,7 @@ void Tools_Pprf_ByTreeIndex_test(const oc::CLP& cmd)
416416
for (auto d : { 32,3242 }) for (auto n : { 8, 19}) for (auto p : { true/*, false*/ })
417417
{
418418
Tools_Pprf_test_impl<u64, u64, CoeffCtxInteger>(d, n, p, f, false, v);
419-
Tools_Pprf_test_impl<block, block, CoeffCtxInteger>(d, n, p, f, false, v);
419+
Tools_Pprf_test_impl<block, block, CoeffCtxGF2>(d, n, p, f, false, v);
420420
}
421421

422422
#else
@@ -435,7 +435,7 @@ void Tools_Pprf_callback_test(const oc::CLP& cmd)
435435
for (auto d : { 32,3242 }) for (auto n : { 8, 128 }) for (auto p : { true/*, false */})
436436
{
437437
Tools_Pprf_test_impl<u64, u64, CoeffCtxInteger>(d, n, p, f, false, v);
438-
Tools_Pprf_test_impl<block, block, CoeffCtxInteger>(d, n, p, f, false, v);
438+
Tools_Pprf_test_impl<block, block, CoeffCtxGF2>(d, n, p, f, false, v);
439439
}
440440
#else
441441
throw UnitTestSkipped("ENABLE_SILENTOT not defined.");

0 commit comments

Comments
 (0)