summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonsykkel <jonrevold@gmail.com>2021-09-08 08:55:17 +0200
committerjonsykkel <jonrevold@gmail.com>2021-09-08 09:11:51 +0200
commitf4037bed5f07757f4f62eb29d2bf91274f726092 (patch)
tree072ec75673ebc4609c0cd427ff4179fb7b1e60c0
parent1cf15ef93e09b692f566096fb72ff11cc04b76e4 (diff)
downloadokeffa-f4037bed5f07757f4f62eb29d2bf91274f726092.tar.gz
move
-rw-r--r--inc/okeffa/fz_arith.h11
-rw-r--r--inc/okeffa/fz_div.h11
-rw-r--r--src/fz_div.c3
-rw-r--r--src/fz_mul.c5
4 files changed, 14 insertions, 16 deletions
diff --git a/inc/okeffa/fz_arith.h b/inc/okeffa/fz_arith.h
index ad726e7..d472eba 100644
--- a/inc/okeffa/fz_arith.h
+++ b/inc/okeffa/fz_arith.h
@@ -3,9 +3,14 @@
#include <okeffa/word.h>
-wbool_t fz_add (word_t *a,word_t *b,word_t *o,size_t len); //returns carry
-wbool_t fz_sub (word_t *a,word_t *b,word_t *o,size_t len); //returns borrow
+wbool_t fz_add (word_t *a,word_t *b,word_t *o,size_t len); //returns carry
+wbool_t fz_add_gated (word_t *a,word_t *b,word_t *o,size_t len,wbool_t gate); //returns carry
+wbool_t fz_sub (word_t *a,word_t *b,word_t *o,size_t len); //returns borrow
-wbool_t fz_add_gated (word_t *a,word_t *b,word_t *o,size_t len,wbool_t gate); //returns carry
+void fz_mul_egypt (word_t *a,word_t *b,word_t *o_lo,word_t *o_hi,size_t len);
+
+void fz_idiv (word_t *a,word_t *b,word_t *q,word_t *r,size_t len);
+void fz_div (word_t *a,word_t *b,word_t *q,size_t len);
+void fz_mod (word_t *a,word_t *b,word_t *r,size_t len);
#endif
diff --git a/inc/okeffa/fz_div.h b/inc/okeffa/fz_div.h
deleted file mode 100644
index 6f84437..0000000
--- a/inc/okeffa/fz_div.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef OKEFFA_FZ_DIV_H
-#define OKEFFA_FZ_DIV_H
-
-#include <okeffa/word.h>
-
-void fz_idiv (word_t *a,word_t *b,word_t *q,word_t *r,size_t len);
-void fz_div (word_t *a,word_t *b,word_t *q,size_t len);
-void fz_mod (word_t *a,word_t *b,word_t *r,size_t len);
-
-#endif
-
diff --git a/src/fz_div.c b/src/fz_div.c
index 77b2200..d2cc999 100644
--- a/src/fz_div.c
+++ b/src/fz_div.c
@@ -1,6 +1,5 @@
-#include <okeffa/fz_div.h>
-#include <okeffa/fz_basic.h>
#include <okeffa/fz_arith.h>
+#include <okeffa/fz_basic.h>
#include <okeffa/fz_shift.h>
#include <okeffa/fz_bitop.h>
#include <okeffa/fz.h>
diff --git a/src/fz_mul.c b/src/fz_mul.c
new file mode 100644
index 0000000..a821035
--- /dev/null
+++ b/src/fz_mul.c
@@ -0,0 +1,5 @@
+#include <okeffa/fz_arith.h>
+
+void fz_mul_egypt(word_t *a,word_t *b,word_t *o_lo,word_t *o_hi,size_t len){
+}
+