From b00c4079347e70ff4cf424cd3785ac59705a4149 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Tue, 22 Mar 2016 18:14:25 +0900 Subject: [PATCH] add mcl_fp_mulIPre --- src/fp.cpp | 1 + src/mul.txt | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/fp.cpp b/src/fp.cpp index 1e0198b..7454d70 100644 --- a/src/fp.cpp +++ b/src/fp.cpp @@ -282,6 +282,7 @@ struct OpeFunc { fp_subNC = mcl_fp_subNC ## n; \ } \ fpDbl_mulPre = mcl_fpDbl_mulPre ## n; \ + fp_mulIPre = mcl_fp_mulIPre ## n; \ if (n <= 256) { \ fpDbl_sqrPre = mcl_fpDbl_sqrPre ## n; \ } \ diff --git a/src/mul.txt b/src/mul.txt index cbde576..e3b39de 100644 --- a/src/mul.txt +++ b/src/mul.txt @@ -18,6 +18,13 @@ noinline @endfor ret i$(bu) %t$(N-2) } +define void @mcl_fp_mulIPre$(bit)(i$(bu)* %pz, i$(bit)* %px, i$(unit) %y) +{ + %x = load i$(bit)* %px + %z = call i$(bu) @mul$(bit)x$(unit)(i$(bit) %x, i$(unit) %y) + store i$(bu) %z, i$(bu)* %pz + ret void +} define void @mcl_fpDbl_mulPre$(bit)(i$(unit)* %pz, i$(bit)* %px, i$(bit)* %py) { %x = load i$(bit)* %px %y = load i$(bit)* %py