diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-07-29 00:14:29 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-07-29 00:14:29 +0000 |
commit | 8d3580d0906e7bcf42a7464fba457080d71c2e6a (patch) | |
tree | f2b4e32befac6c4db4ce4d066e9dbb8be75c0502 /sim/igen/gen.c | |
parent | d846a17c700e3fbd849c79724cd5755569d8b56f (diff) | |
download | gdb-8d3580d0906e7bcf42a7464fba457080d71c2e6a.zip gdb-8d3580d0906e7bcf42a7464fba457080d71c2e6a.tar.gz gdb-8d3580d0906e7bcf42a7464fba457080d71c2e6a.tar.bz2 |
Fix incorrect calculation of conditional field when being extracted
from a previous decode.
Diffstat (limited to 'sim/igen/gen.c')
-rw-r--r-- | sim/igen/gen.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sim/igen/gen.c b/sim/igen/gen.c index 5cc7e76..53b1c1f 100644 --- a/sim/igen/gen.c +++ b/sim/igen/gen.c @@ -1039,8 +1039,17 @@ gen_entry_expand_opcode (gen_entry *table, /* the table entry fully specified the condition field's value */ + /* extract the field's value + from the opcode */ value = sub_val (t->opcode_nr, t->parent->opcode->last, - first_pos, last_pos); + condition->field->first, condition->field->last); + /* this is a requirement of + a conditonal field + refering to another field */ + ASSERT ((condition->field->first - condition->field->last) + == (first_pos - last_pos)); +printf ("value=%d, opcode_nr=%d, last=%d, [%d..%d]\n", + value, t->opcode_nr, t->parent->opcode->last, condition->field->first, condition->field->last); } } } |