Revision 6a8d7b76 tcg/tcg.c

b/tcg/tcg.c
308 308
    return MAKE_TCGV(idx);
309 309
}
310 310

  
311
#if TCG_TARGET_REG_BITS == 32
312
/* temporary hack to avoid register shortage for tcg_qemu_st64() */
313
TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2, 
314
                              const char *name)
315
{
316
    TCGContext *s = &tcg_ctx;
317
    TCGTemp *ts;
318
    int idx;
319
    char buf[64];
320

  
321
    if (type != TCG_TYPE_I64)
322
        tcg_abort();
323
    idx = s->nb_globals;
324
    tcg_temp_alloc(s, s->nb_globals + 2);
325
    ts = &s->temps[s->nb_globals];
326
    ts->base_type = type;
327
    ts->type = TCG_TYPE_I32;
328
    ts->fixed_reg = 1;
329
    ts->reg = reg1;
330
    ts->val_type = TEMP_VAL_REG;
331
    pstrcpy(buf, sizeof(buf), name);
332
    pstrcat(buf, sizeof(buf), "_0");
333
    ts->name = strdup(buf);
334

  
335
    ts++;
336
    ts->base_type = type;
337
    ts->type = TCG_TYPE_I32;
338
    ts->fixed_reg = 1;
339
    ts->reg = reg2;
340
    ts->val_type = TEMP_VAL_REG;
341
    pstrcpy(buf, sizeof(buf), name);
342
    pstrcat(buf, sizeof(buf), "_1");
343
    ts->name = strdup(buf);
344

  
345
    s->nb_globals += 2;
346
    return MAKE_TCGV(idx);
347
}
348
#endif
349

  
311 350
TCGv tcg_global_mem_new(TCGType type, int reg, tcg_target_long offset,
312 351
                        const char *name)
313 352
{

Also available in: Unified diff