diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2020-09-09 21:36:18 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2020-09-09 21:36:18 (GMT) | 
| commit | eb8896aed68fbacf87a2c530fcd584b71da2c222 (patch) | |
| tree | de3a5938a96740fe772718750dd3433e15c37f55 /tools | |
| parent | c8f8dc0ea69a404b407f84cbccc25c1af7804836 (diff) | |
Removed the "see" action from available rule actions.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/d2c/rules/grammar.y | 3 | ||||
| -rw-r--r-- | tools/d2c/rules/manager.c | 22 | ||||
| -rw-r--r-- | tools/d2c/rules/manager.h | 4 | 
3 files changed, 3 insertions, 26 deletions
diff --git a/tools/d2c/rules/grammar.y b/tools/d2c/rules/grammar.y index bf5b3c2..468b793 100644 --- a/tools/d2c/rules/grammar.y +++ b/tools/d2c/rules/grammar.y @@ -82,8 +82,7 @@ rule_cond : NAME                { $$ = build_named_cond_expression($1); }            | EXPR_START rule_cond EXPR_END AND EXPR_START rule_cond EXPR_END                                  { $$ = build_composed_cond_expression($2, COT_AND, $6); } -action : SEE RAW_LINE       { $$.type = CAT_SEE; $$.details = make_callable($2, false); } -       | UNPREDICTABLE      { $$.type = CAT_UNPREDICTABLE; } +action : UNPREDICTABLE      { $$.type = CAT_UNPREDICTABLE; }         | CALL RAW_LINE      {                                  right_op_t rop;                                  bool status; diff --git a/tools/d2c/rules/manager.c b/tools/d2c/rules/manager.c index 1face3e..cd890d0 100644 --- a/tools/d2c/rules/manager.c +++ b/tools/d2c/rules/manager.c @@ -497,10 +497,6 @@ void delete_decoding_rules(decoding_rules *rules)          switch (rule->action.type)          { -            case CAT_SEE: -                free(rule->action.details); -                break; -              case CAT_UNPREDICTABLE:                  break; @@ -663,20 +659,6 @@ bool write_decoding_rules(decoding_rules *rules, CondActionType filter, int fd,          switch (rule->action.type)          { -            case CAT_SEE: - -#if 0 -                dprintf(fd, "\t\t\tinstr = %s_read_%sinstr_%s", arch, subarch, rule->action.details); - -                /* TODO : adapter les paramètres d'appel selon le 'coder' */ -                dprintf(fd, "(_raw);\n"); - -                dprintf(fd, "\t\t\tgoto quick_exit;\n"); - -                *exit = true; -#endif -                break; -              case CAT_UNPREDICTABLE:                  break; @@ -690,8 +672,8 @@ bool write_decoding_rules(decoding_rules *rules, CondActionType filter, int fd,                      callable = rule->action.callee;                  if (rule->expr != NULL) -                    dprintf(fd, "\t") -; +                    dprintf(fd, "\t"); +                  dprintf(fd, "%s", tab);                  result = call_instr_func(callable, rule->action.args, fd, bits, list); diff --git a/tools/d2c/rules/manager.h b/tools/d2c/rules/manager.h index f6d2ade..8161fdb 100644 --- a/tools/d2c/rules/manager.h +++ b/tools/d2c/rules/manager.h @@ -72,7 +72,6 @@ cond_expr *build_composed_cond_expression(cond_expr *, CondOpType, cond_expr *);  /* Conséquence en cas de condition remplie */  typedef enum _CondActionType  { -    CAT_SEE,                                /* Renvoi vers une instruction */      CAT_UNPREDICTABLE,                      /* Cas de figure improbable    */      CAT_CALL,                               /* Appel à une fonction C      */      CAT_CHECKED_CALL                        /* Appel à une fonction C      */ @@ -86,9 +85,6 @@ typedef struct _rule_action      union      { -        /* CAT_SEE */ -        char *details;                      /* Eventuel complément d'info. */ -          /* CAT_CALL / CAT_CHECKED_CALL */          struct          {  | 
