projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix various assumptions about mpw sizes.
[u/mdw/catacomb]
/
gfreduce.c
diff --git
a/gfreduce.c
b/gfreduce.c
index
bdf3579
..
01ca678
100644
(file)
--- a/
gfreduce.c
+++ b/
gfreduce.c
@@
-90,7
+90,7
@@
void gfreduce_create(gfreduce *r, mp *p)
unsigned long i;
gfreduce_instr *ip;
unsigned f = 0;
unsigned long i;
gfreduce_instr *ip;
unsigned f = 0;
- size_t w, ww, wi, wl, ll;
+ size_t w, ww, wi, wl, ll
, bb
;
/* --- Sort out the easy stuff --- */
/* --- Sort out the easy stuff --- */
@@
-121,6
+121,7
@@
void gfreduce_create(gfreduce *r, mp *p)
wi = DA_LEN(&iv);
f = 0;
ll = 0;
wi = DA_LEN(&iv);
f = 0;
ll = 0;
+ bb = MPW_BITS - dw;
for (i = 0, mp_scan(&sc, p); mp_step(&sc) && i < d; i++) {
if (!mp_bit(&sc))
continue;
for (i = 0, mp_scan(&sc, p); mp_step(&sc) && i < d; i++) {
if (!mp_bit(&sc))
continue;
@@
-149,8
+150,8
@@
void gfreduce_create(gfreduce *r, mp *p)
w = ww;
wi = DA_LEN(&iv);
}
w = ww;
wi = DA_LEN(&iv);
}
- INSTR(GFRI_LSL, (
MPW_BITS + i - d
)%MPW_BITS);
- if ((
MPW_BITS + i - d
)%MPW_BITS)
+ INSTR(GFRI_LSL, (
bb + i
)%MPW_BITS);
+ if ((
bb + i
)%MPW_BITS)
f |= f_lsr;
}
wl = DA_LEN(&iv);
f |= f_lsr;
}
wl = DA_LEN(&iv);