summaryrefslogtreecommitdiffstats
path: root/src/a5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/a5.c')
-rw-r--r--src/a5.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/a5.c b/src/a5.c
index aba19a4..f36bfac 100644
--- a/src/a5.c
+++ b/src/a5.c
@@ -35,6 +35,8 @@ void a5_loop(uint64_t x0,uint64_t x1){
for(uint32_t x = x0;x < x1_32;x++){
uint32_t next;
+
+ /*
uint64_t *index_ptr;
int index_bit;
@@ -47,11 +49,30 @@ void a5_loop(uint64_t x0,uint64_t x1){
next = 0;
*index_ptr |= 1ULL<<index_bit;
}
+ */
+
+ if(t < filled){
+ next = x-lastp[t];
+ }else{
+ uint64_t *index_ptr;
+ uint64_t index_bit;
+
+ index_ptr = index+(t>>6);
+ index_bit = 1ULL<<(t & 63);
+ if(*index_ptr & index_bit){
+ next = x-lastp[t];
+ }else{
+ next = 0;
+ *index_ptr |= index_bit;
+ }
+ }
lastp[t] = x;
+
if(t == filled){
while(lastp[++filled]);
}
+
t = next;
}
}