diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-10 13:38:35 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:05:55 -0700 |
| commit | b44ebb0676e55ae46c4dbb70a44d961c0c2c8901 (patch) | |
| tree | 75acdf003c070638c8d78282ef869113eed6ce17 /example.c | |
| parent | 03948840092b29717908b292bfc619e3fe7b8dd6 (diff) | |
| download | sparse-dev-b44ebb0676e55ae46c4dbb70a44d961c0c2c8901.tar.gz | |
Be a bit more forgiving about impossible output register situations.
We get those when encountering unimplemented instructions, since
then we'll have bad register contents. Let's just silently ignore
it for now.
Diffstat (limited to 'example.c')
| -rw-r--r-- | example.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -799,7 +799,8 @@ static int final_pseudo_flush(struct bb_state *state, pseudo_t pseudo, struct ha * storage for it.. */ hash = find_storage_hash(pseudo, state->outputs); - assert(hash); + if (!hash) + return 1; out = hash->storage; /* If the output is in a register, try to get it there.. */ @@ -837,6 +838,8 @@ static int final_pseudo_flush(struct bb_state *state, pseudo_t pseudo, struct ha return 1; copy_to_dst: + if (reg == dst) + return 1; output_insn(state, "movl %s,%s", reg->name, dst->name); add_pseudo_reg(state, pseudo, dst); return 1; |
