diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2011-07-08 06:24:11 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2011-07-08 06:24:11 +0000 |
commit | af3425583837b2be2fdf58294f33ffdc4f176492 (patch) | |
tree | 045bcb08db4d5527a48f58a983787467770deb14 /sim/igen/gen-idecode.c | |
parent | 3faa01e34f6d91a355fce718c66067ffd8b3cc46 (diff) | |
download | gdb-af3425583837b2be2fdf58294f33ffdc4f176492.zip gdb-af3425583837b2be2fdf58294f33ffdc4f176492.tar.gz gdb-af3425583837b2be2fdf58294f33ffdc4f176492.tar.bz2 |
Correct handling of constant fields.
* gen.c (insn_field_cmp): Tweak comment about neither field
being an insn_field_string with a cond_eq-to-value condition.
(insns_bit_useless) <case insn_field_string, case
decode_find_mixed>: Handle cond_eq-to-value fields as
insn_field_int.
* gen-idecode.c (print_idecode_validate): Handle
insn_field_string cond-equal-to-value fields as insn_field_int.
* gen-icache.c (print_icache_body): Add comment why constant
string fields are handled.
Diffstat (limited to 'sim/igen/gen-idecode.c')
-rw-r--r-- | sim/igen/gen-idecode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sim/igen/gen-idecode.c b/sim/igen/gen-idecode.c index cb5ae54..b24a2eb 100644 --- a/sim/igen/gen-idecode.c +++ b/sim/igen/gen-idecode.c @@ -750,7 +750,13 @@ print_idecode_validate (lf *file, /* Only need to validate constant (and reserved) bits. Skip any others */ if (field->type != insn_field_int - && field->type != insn_field_reserved) + && field->type != insn_field_reserved + /* Consider a named field equal to a value to be just as + constant as an integer field. */ + && (field->type != insn_field_string + || field->conditions == NULL + || field->conditions->test != insn_field_cond_eq + || field->conditions->type != insn_field_cond_value)) continue; /* Look through the list of opcode paths that lead to this |