Revision 5d04f23b tcg/tcg.c
b/tcg/tcg.c | ||
---|---|---|
313 | 313 |
return MAKE_TCGV_I64(idx); |
314 | 314 |
} |
315 | 315 |
|
316 |
#if TCG_TARGET_REG_BITS == 32 |
|
317 |
/* temporary hack to avoid register shortage for tcg_qemu_st64() */ |
|
318 |
TCGv_i64 tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2, |
|
319 |
const char *name) |
|
320 |
{ |
|
321 |
TCGContext *s = &tcg_ctx; |
|
322 |
TCGTemp *ts; |
|
323 |
int idx; |
|
324 |
char buf[64]; |
|
325 |
|
|
326 |
if (type != TCG_TYPE_I64) |
|
327 |
tcg_abort(); |
|
328 |
idx = s->nb_globals; |
|
329 |
tcg_temp_alloc(s, s->nb_globals + 2); |
|
330 |
ts = &s->temps[s->nb_globals]; |
|
331 |
ts->base_type = type; |
|
332 |
ts->type = TCG_TYPE_I32; |
|
333 |
ts->fixed_reg = 1; |
|
334 |
ts->reg = reg1; |
|
335 |
pstrcpy(buf, sizeof(buf), name); |
|
336 |
pstrcat(buf, sizeof(buf), "_0"); |
|
337 |
ts->name = strdup(buf); |
|
338 |
|
|
339 |
ts++; |
|
340 |
ts->base_type = type; |
|
341 |
ts->type = TCG_TYPE_I32; |
|
342 |
ts->fixed_reg = 1; |
|
343 |
ts->reg = reg2; |
|
344 |
pstrcpy(buf, sizeof(buf), name); |
|
345 |
pstrcat(buf, sizeof(buf), "_1"); |
|
346 |
ts->name = strdup(buf); |
|
347 |
|
|
348 |
s->nb_globals += 2; |
|
349 |
return MAKE_TCGV_I64(idx); |
|
350 |
} |
|
351 |
#endif |
|
352 |
|
|
353 | 316 |
static inline int tcg_global_mem_new_internal(TCGType type, int reg, |
354 | 317 |
tcg_target_long offset, |
355 | 318 |
const char *name) |
Also available in: Unified diff