core/instrlist.c
/* prepends inst to the list ("inst" can be a chain of insts) */
prepends inst to the list ("inst" can be a chain of insts)
prepends inst to the list ( " inst " can be a chain of insts )
void
instrlist_prepend(instrlist_t *ilist, instr_t *inst)
{
    instr_t *top = inst;
    instr_t *bot;
    CLIENT_ASSERT(instr_get_prev(inst) == NULL,
                  "instrlist_prepend: cannot add middle of list");
    check_translation(ilist, inst);
    while (instr_get_next(inst)) {
        inst = instr_get_next(inst);
        check_translation(ilist, inst);
    }
    bot = inst;
    if (ilist->first) {
        instr_set_next(bot, ilist->first);
        instr_set_prev(ilist->first, bot);
        ilist->first = top;
    } 
    else {
        ilist->first = top;
        ilist->last = bot;
    }
}
void instrlist_prepend ( instrlist_t * ilist , instr_t * inst ) { instr_t * top = inst ; instr_t * bot ; CLIENT_ASSERT ( instr_get_prev ( inst ) == NULL , " " ) ; check_translation ( ilist , inst ) ; while ( instr_get_next ( inst ) ) { inst = instr_get_next ( inst ) ; check_translation ( ilist , inst ) ; } bot = inst ; if ( ilist -> first ) { instr_set_next ( bot , ilist -> first ) ; instr_set_prev ( ilist -> first , bot ) ; ilist -> first = top ; } else { ilist -> first = top ; ilist -> last = bot ; } }
prepends inst to the list ("inst" can be a chain of insts)
prepends inst to the list ( " inst " can be a chain of insts )