Home | History | Annotate | Download | only in tcg

Lines Matching defs:ts

298     TCGTemp *ts;
309 ts = &s->temps[s->nb_globals];
310 ts->base_type = type;
311 ts->type = type;
312 ts->fixed_reg = 1;
313 ts->reg = reg;
314 ts->name = name;
341 TCGTemp *ts;
349 ts = &s->temps[s->nb_globals];
350 ts->base_type = type;
351 ts->type = TCG_TYPE_I32;
352 ts->fixed_reg = 0;
353 ts->mem_allocated = 1;
354 ts->mem_reg = reg;
356 ts->mem_offset = offset + 4;
358 ts->mem_offset = offset;
362 ts->name = strdup(buf);
363 ts++;
365 ts->base_type = type;
366 ts->type = TCG_TYPE_I32;
367 ts->fixed_reg = 0;
368 ts->mem_allocated = 1;
369 ts->mem_reg = reg;
371 ts->mem_offset = offset;
373 ts->mem_offset = offset + 4;
377 ts->name = strdup(buf);
384 ts = &s->temps[s->nb_globals];
385 ts->base_type = type;
386 ts->type = type;
387 ts->fixed_reg = 0;
388 ts->mem_allocated = 1;
389 ts->mem_reg = reg;
390 ts->mem_offset = offset;
391 ts->name = name;
418 TCGTemp *ts;
428 ts = &s->temps[idx];
429 s->first_free_temp[k] = ts->next_free_temp;
430 ts->temp_allocated = 1;
431 assert(ts->temp_local == temp_local);
437 ts = &s->temps[s->nb_temps];
438 ts->base_type = type;
439 ts->type = TCG_TYPE_I32;
440 ts->temp_allocated = 1;
441 ts->temp_local = temp_local;
442 ts->name = NULL;
443 ts++;
444 ts->base_type = TCG_TYPE_I32;
445 ts->type = TCG_TYPE_I32;
446 ts->temp_allocated = 1;
447 ts->temp_local = temp_local;
448 ts->name = NULL;
454 ts = &s->temps[s->nb_temps];
455 ts->base_type = type;
456 ts->type = type;
457 ts->temp_allocated = 1;
458 ts->temp_local = temp_local;
459 ts->name = NULL;
489 TCGTemp *ts;
500 ts = &s->temps[idx];
501 assert(ts->temp_allocated != 0);
502 ts->temp_allocated = 0;
503 k = ts->base_type;
504 if (ts->temp_local)
506 ts->next_free_temp = s->first_free_temp[k];
766 TCGTemp *ts;
768 ts = &s->temps[i];
769 if (ts->fixed_reg) {
770 ts->val_type = TEMP_VAL_REG;
772 ts->val_type = TEMP_VAL_MEM;
776 ts = &s->temps[i];
777 ts->val_type = TEMP_VAL_DEAD;
778 ts->mem_allocated = 0;
779 ts->fixed_reg = 0;
789 TCGTemp *ts;
791 ts = &s->temps[idx];
793 pstrcpy(buf, buf_size, ts->name);
795 if (ts->temp_local)
1193 TCGTemp *ts;
1196 ts = &s->temps[s->nb_globals];
1198 if (ts->temp_local)
1202 ts++;
1380 TCGTemp *ts;
1385 ts = &s->temps[i];
1387 switch(ts->val_type) {
1389 printf("%s", tcg_target_reg_names[ts->reg]);
1392 printf("%d(%s)", (int)ts->mem_offset, tcg_target_reg_names[ts->mem_reg]);
1395 printf("$0x%" TCG_PRIlx, ts->val);
1419 TCGTemp *ts;
1425 ts = &s->temps[k];
1426 if (ts->val_type != TEMP_VAL_REG ||
1427 ts->reg != reg) {
1435 ts = &s->temps[k];
1436 if (ts->val_type == TEMP_VAL_REG &&
1437 !ts->fixed_reg &&
1438 s->reg_to_temp[ts->reg] != k) {
1452 TCGTemp *ts;
1453 ts = &s->temps[temp];
1457 ts->mem_offset = s->current_frame_offset;
1458 ts->mem_reg = s->frame_reg;
1459 ts->mem_allocated = 1;
1466 TCGTemp *ts;
1471 ts = &s->temps[temp];
1472 assert(ts->val_type == TEMP_VAL_REG);
1473 if (!ts->mem_coherent) {
1474 if (!ts->mem_allocated)
1476 tcg_out_st(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
1478 ts->val_type = TEMP_VAL_MEM;
1514 TCGTemp *ts;
1517 ts = &s->temps[temp];
1518 if (!ts->fixed_reg) {
1519 switch(ts->val_type) {
1521 tcg_reg_free(s, ts->reg);
1524 ts->val_type = TEMP_VAL_MEM;
1527 reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
1529 if (!ts->mem_allocated)
1531 tcg_out_movi(s, ts->type, reg, ts->val);
1532 tcg_out_st(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
1533 ts->val_type = TEMP_VAL_MEM;
1559 TCGTemp *ts;
1563 ts = &s->temps[i];
1564 if (ts->temp_local) {
1567 if (ts->val_type == TEMP_VAL_REG) {
1568 s->reg_to_temp[ts->reg] = -1;
1570 ts->val_type = TEMP_VAL_DEAD;
1604 TCGTemp *ts, *ots;
1609 ts = &s->temps[args[1]];
1613 if (ts->val_type == TEMP_VAL_REG) {
1614 if (IS_DEAD_IARG(0) && !ts->fixed_reg && !ots->fixed_reg) {
1618 reg = ts->reg;
1620 ts->val_type = TEMP_VAL_DEAD;
1627 if (ts->reg != reg) {
1628 tcg_out_mov(s, ots->type, reg, ts->reg);
1631 } else if (ts->val_type == TEMP_VAL_MEM) {
1637 tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
1638 } else if (ts->val_type == TEMP_VAL_CONST) {
1641 tcg_out_movi(s, ots->type, reg, ts->val);
1647 ots->val = ts->val;
1668 TCGTemp *ts;
1686 ts = &s->temps[arg];
1687 if (ts->val_type == TEMP_VAL_MEM) {
1689 tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
1690 ts->val_type = TEMP_VAL_REG;
1691 ts->reg = reg;
1692 ts->mem_coherent = 1;
1694 } else if (ts->val_type == TEMP_VAL_CONST) {
1695 if (tcg_target_const_match(ts->val, arg_ct)) {
1698 new_args[i] = ts->val;
1703 tcg_out_movi(s, ts->type, reg, ts->val);
1704 ts->val_type = TEMP_VAL_REG;
1705 ts->reg = reg;
1706 ts->mem_coherent = 0;
1710 assert(ts->val_type == TEMP_VAL_REG);
1712 if (ts->fixed_reg) {
1725 reg = ts->reg;
1733 tcg_out_mov(s, ts->type, reg, ts->reg);
1748 ts = &s->temps[arg];
1749 if (!ts->fixed_reg) {
1750 if (ts->val_type == TEMP_VAL_REG)
1751 s->reg_to_temp[ts->reg] = -1;
1752 ts->val_type = TEMP_VAL_DEAD;
1778 ts = &s->temps[arg];
1783 reg = ts->reg;
1784 if (ts->fixed_reg &&
1792 if (!ts->fixed_reg) {
1793 if (ts->val_type == TEMP_VAL_REG)
1794 s->reg_to_temp[ts->reg] = -1;
1795 ts->val_type = TEMP_VAL_REG;
1796 ts->reg = reg;
1799 ts->mem_coherent = 0;
1812 ts = &s->temps[args[i]];
1814 if (ts->fixed_reg && ts->reg != reg) {
1815 tcg_out_mov(s, ts->type, ts->reg, reg);
1832 TCGTemp *ts;
1867 ts = &s->temps[arg];
1868 if (ts->val_type == TEMP_VAL_REG) {
1869 tcg_out_st(s, ts->type, ts->reg, TCG_REG_CALL_STACK, stack_offset);
1870 } else if (ts->val_type == TEMP_VAL_MEM) {
1871 reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
1874 tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
1875 tcg_out_st(s, ts->type, reg, TCG_REG_CALL_STACK, stack_offset);
1876 } else if (ts->val_type == TEMP_VAL_CONST) {
1877 reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
1880 tcg_out_movi(s, ts->type, reg, ts->val);
1881 tcg_out_st(s, ts->type, reg, TCG_REG_CALL_STACK, stack_offset);
1896 ts = &s->temps[arg];
1899 if (ts->val_type == TEMP_VAL_REG) {
1900 if (ts->reg != reg) {
1901 tcg_out_mov(s, ts->type, reg, ts->reg);
1903 } else if (ts->val_type == TEMP_VAL_MEM) {
1904 tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
1905 } else if (ts->val_type == TEMP_VAL_CONST) {
1907 tcg_out_movi(s, ts->type, reg, ts->val);
1918 ts = &s->temps[func_arg];
1919 func_addr = ts->val;
1921 if (ts->val_type == TEMP_VAL_MEM) {
1923 tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
1926 } else if (ts->val_type == TEMP_VAL_REG) {
1927 reg = ts->reg;
1930 tcg_out_mov(s, ts->type, reg, ts->reg);
1934 } else if (ts->val_type == TEMP_VAL_CONST) {
1940 tcg_out_movi(s, ts->type, reg, func_addr);
1953 ts = &s->temps[arg];
1954 if (!ts->fixed_reg) {
1955 if (ts->val_type == TEMP_VAL_REG)
1956 s->reg_to_temp[ts->reg] = -1;
1957 ts->val_type = TEMP_VAL_DEAD;
1984 ts = &s->temps[arg];
1987 if (ts->fixed_reg) {
1988 if (ts->reg != reg) {
1989 tcg_out_mov(s, ts->type, ts->reg, reg);
1992 if (ts->val_type == TEMP_VAL_REG)
1993 s->reg_to_temp[ts->reg] = -1;
1994 ts->val_type = TEMP_VAL_REG;
1995 ts->reg = reg;
1996 ts->mem_coherent = 0;
2123 TCGTemp *ts;
2124 ts = &s->temps[args[0]];
2126 if (!ts->fixed_reg) {
2127 if (ts->val_type == TEMP_VAL_REG)
2128 s->reg_to_temp[ts->reg] = -1;
2129 ts->val_type = TEMP_VAL_DEAD;