Revision c68aaa18

b/tcg/tcg.c
981 981
        op = tdefs->op;
982 982
        assert(op >= 0 && op < NB_OPS);
983 983
        def = &tcg_op_defs[op];
984
#if defined(CONFIG_DEBUG_TCG)
985
        /* Duplicate entry in op definitions? */
986
        assert(!def->used);
987
        def->used = 1;
988
#endif
984 989
        nb_args = def->nb_iargs + def->nb_oargs;
985 990
        for(i = 0; i < nb_args; i++) {
986 991
            ct_str = tdefs->args_ct_str[i];
992
            /* Incomplete TCGTargetOpDef entry? */
993
            assert(ct_str != NULL);
987 994
            tcg_regset_clear(def->args_ct[i].u.regs);
988 995
            def->args_ct[i].ct = 0;
989 996
            if (ct_str[0] >= '0' && ct_str[0] <= '9') {
......
1018 1025
            }
1019 1026
        }
1020 1027

  
1028
        /* TCGTargetOpDef entry with too much information? */
1029
        assert(i == TCG_MAX_OP_ARGS || tdefs->args_ct_str[i] == NULL);
1030

  
1021 1031
        /* sort the constraints (XXX: this is just an heuristic) */
1022 1032
        sort_constraints(def, 0, def->nb_oargs);
1023 1033
        sort_constraints(def, def->nb_oargs, def->nb_iargs);
......
1035 1045
        tdefs++;
1036 1046
    }
1037 1047

  
1048
#if defined(CONFIG_DEBUG_TCG)
1049
    for (op = 0; op < ARRAY_SIZE(tcg_op_defs); op++) {
1050
        if (op < INDEX_op_call || op == INDEX_op_debug_insn_start) {
1051
            /* Wrong entry in op definitions? */
1052
            assert(!tcg_op_defs[op].used);
1053
        } else {
1054
            /* Missing entry in op definitions? */
1055
            assert(tcg_op_defs[op].used);
1056
        }
1057
    }
1058
#endif
1038 1059
}
1039 1060

  
1040 1061
#ifdef USE_LIVENESS_ANALYSIS
b/tcg/tcg.h
412 412
    uint16_t copy_size;
413 413
    TCGArgConstraint *args_ct;
414 414
    int *sorted_args;
415
#if defined(CONFIG_DEBUG_TCG)
416
    int used;
417
#endif
415 418
} TCGOpDef;
416 419
        
417 420
typedef struct TCGTargetOpDef {

Also available in: Unified diff