summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonsykkel <jonrevold@gmail.com>2021-09-09 11:52:03 +0200
committerjonsykkel <jonrevold@gmail.com>2021-09-09 11:52:03 +0200
commit91eaaeaaf9824c79a5dc3b823afcd152e48cd916 (patch)
tree5d025467540c22ae160230e5715c9a264ebb0318
parent86e6290a60e37f16ebbf5d0840e6e2059b4898a2 (diff)
downloadokeffa-91eaaeaaf9824c79a5dc3b823afcd152e48cd916.tar.gz
smal div optimiz, proly vrong
-rw-r--r--src/fz_div.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fz_div.c b/src/fz_div.c
index 861040c..8e53c48 100644
--- a/src/fz_div.c
+++ b/src/fz_div.c
@@ -15,10 +15,10 @@ void fz_idiv(word_t *a,word_t *b,word_t *q_out,word_t *r_out,size_t len){
fz_clear(r,len);
for(size_t x = 0;x < bitness;x++){
wbool_t c;
- fz_shl(qr,qr,qr_len,1);
+ fz_shl_i(qr,qr,qr_len,1,1);
c = fz_sub(r,b,r,len);
fz_add_gated(r,b,r,len,c);
- fz_or_w(q,wb_not(c));
+ fz_xor_w(q,c);
}
fz_copy(q,q_out,len);
fz_copy(r,r_out,len);