示例#1
0
static TCGLabelPoolData *new_pool_alloc(TCGContext *s, int nlong, int rtype,
                                        tcg_insn_unit *label, intptr_t addend)
{
    TCGLabelPoolData *n = tcg_malloc(sizeof(TCGLabelPoolData)
                                     + sizeof(tcg_target_ulong) * nlong);

    n->label = label;
    n->addend = addend;
    n->rtype = rtype;
    n->nlong = nlong;
    return n;
}
示例#2
0
文件: tcg-pool.inc.c 项目: 8tab/qemu
static void new_pool_label(TCGContext *s, tcg_target_ulong data, int type,
                           tcg_insn_unit *label, intptr_t addend)
{
    TCGLabelPoolData *n = tcg_malloc(sizeof(*n));
    TCGLabelPoolData *i, **pp;

    n->data = data;
    n->label = label;
    n->type = type;
    n->addend = addend;

    /* Insertion sort on the pool.  */
    for (pp = &s->pool_labels; (i = *pp) && i->data < data; pp = &i->next) {
        continue;
    }
    n->next = *pp;
    *pp = n;
}