aboutsummaryrefslogtreecommitdiff
path: root/sim/igen/gen-idecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/igen/gen-idecode.c')
-rw-r--r--sim/igen/gen-idecode.c8
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