static TranslationBlock *tb_alloc(target_ulong pc)

{

    TranslationBlock *tb;



    if (tcg_ctx.tb_ctx.nb_tbs >= tcg_ctx.code_gen_max_blocks ||

        (tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer) >=

         tcg_ctx.code_gen_buffer_max_size) {

        return NULL;

    }

    tb = &tcg_ctx.tb_ctx.tbs[tcg_ctx.tb_ctx.nb_tbs++];

    tb->pc = pc;

    tb->cflags = 0;

    return tb;

}
