mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-22 07:58:28 +02:00
Fixed some bugs in the vector list re-ordering function. This should work now,
but there's another problem in the dumping code that still spoils the fun. - inst.c (do_move_to_vec): marking algorithm propagated an uninitialized value - inst.c (do_move_to_vec): we have to clear the marks of vectors that are before the vector being moved, because they will still be visited and propagated git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5714 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
2dffbfeaa9
commit
907bcf919b
10
inst.c
10
inst.c
@ -635,11 +635,14 @@ static void do_move_to_vec(struct inst *inst, struct inst *to, int i)
|
||||
* Mark the vector that's being rebased and all vectors that
|
||||
* (recursively) depend on it.
|
||||
*
|
||||
* We're only interested in the range between the vector being moved
|
||||
* We're mainly interested in the range between the vector being moved
|
||||
* and the new base. If the vector follows the base, the list is
|
||||
* already in the correct order and nothing needs moving.
|
||||
*/
|
||||
for (v = vec; v && v != to_vec; v = v->next)
|
||||
for (v = frame->vecs; v != vec; v = v->next)
|
||||
v->mark = 0;
|
||||
vec->mark = 1;
|
||||
for (v = vec->next; v && v != to_vec; v = v->next)
|
||||
v->mark = v->base ? v->base->mark : 0;
|
||||
if (!v)
|
||||
return;
|
||||
@ -647,6 +650,9 @@ static void do_move_to_vec(struct inst *inst, struct inst *to, int i)
|
||||
/*
|
||||
* All the marked vectors appearing on the list before the new base
|
||||
* are moved after the new base, preserving their order.
|
||||
*
|
||||
* Start at frame->vecs, not "vec", so that we move the the vector
|
||||
* being rebased as well.
|
||||
*/
|
||||
anchor = &to_vec->next;
|
||||
walk = &frame->vecs;
|
||||
|
Loading…
Reference in New Issue
Block a user