Lines Matching +full:width +full:- +full:mm

2  *  Copyright(c) 2019-2023 rev.ng Labs Srl. All Rights Reserved.
28 #include "idef-parser.h"
29 #include "parser-helpers.h"
30 #include "idef-parser.tab.h"
31 #include "idef-parser.yy.h"
38 const char *code_ptr = c->input_buffer; in yyerror()
40 fprintf(stderr, "WARNING (%s): '%s'\n", c->inst.name->str, s); in yyerror()
43 for (int i = locp->first_column; i < locp->last_column; i++) { in yyerror()
52 code_ptr[locp->first_column - 10 + i] != '\0' && in yyerror()
53 code_ptr[locp->first_column - 10 + i] != '\n'; in yyerror()
55 fprintf(stderr, "%c", code_ptr[locp->first_column - 10 + i]); in yyerror()
62 for (int i = 0; i < (locp->last_column - locp->first_column) - 1; i++) { in yyerror()
66 c->inst.error_count++; in yyerror()
71 return value->pred.id >= '0' && value->pred.id <= '3'; in is_direct_predicate()
76 return c->ternary->len > 0; in is_inside_ternary()
113 EMIT(c, "tmp_%d", tmp->index); in tmp_print()
120 EMIT(c, "P%c%c", pred->id, suffix); in pred_print()
126 switch (reg->type) { in reg_compose()
138 reg_id[1] = reg->id; in reg_compose()
142 switch (reg->bit_width) { in reg_compose()
144 reg_id[1] = reg->id; in reg_compose()
148 reg_id[1] = reg->id; in reg_compose()
149 reg_id[2] = reg->id; in reg_compose()
153 yyassert(c, locp, false, "Unhandled register bit width!\n"); in reg_compose()
167 EMIT(c, "hex_gpr[%u]", reg->id); in reg_print()
172 HexImm *imm = &rvalue->imm; in imm_print()
173 switch (imm->type) { in imm_print()
178 EMIT(c, "%ciV", imm->id); in imm_print()
181 if (rvalue->bit_width == 32) { in imm_print()
182 if (rvalue->signedness == UNSIGNED) { in imm_print()
183 EMIT(c, "((uint32_t) 0x%" PRIx32 ")", (uint32_t) imm->value); in imm_print()
185 EMIT(c, "((int32_t) 0x%" PRIx32 ")", (int32_t) imm->value); in imm_print()
187 } else if (rvalue->bit_width == 64) { in imm_print()
188 if (rvalue->signedness == UNSIGNED) { in imm_print()
189 EMIT(c, "((uint64_t) 0x%" PRIx64 "ULL)", (uint64_t) imm->value); in imm_print()
191 EMIT(c, "((int64_t) 0x%" PRIx64 "LL)", (int64_t) imm->value); in imm_print()
198 EMIT(c, "qemu_tmp_%" PRIu64, imm->index); in imm_print()
201 EMIT(c, "ctx->base.pc_next"); in imm_print()
204 EMIT(c, "insn->extension_valid"); in imm_print()
214 EMIT(c, "%s", var->name->str); in var_print()
220 switch (rvalue->type) { in rvalue_print()
222 reg_print(c, locp, &rvalue->reg); in rvalue_print()
225 reg_arg_print(c, locp, &rvalue->reg); in rvalue_print()
228 tmp_print(c, locp, &rvalue->tmp); in rvalue_print()
234 var_print(c, locp, &rvalue->var); in rvalue_print()
237 pred_print(c, locp, &rvalue->pred, rvalue->is_dotnew); in rvalue_print()
255 for (char *x = c->inst.code_begin; x < c->inst.code_end; x++) { in commit()
261 fwrite(c->signature_str->str, sizeof(char), c->signature_str->len, in commit()
262 c->output_file); in commit()
263 fwrite(c->header_str->str, sizeof(char), c->header_str->len, in commit()
264 c->output_file); in commit()
265 fwrite(c->out_str->str, sizeof(char), c->out_str->len, in commit()
266 c->output_file); in commit()
268 fwrite(c->signature_str->str, sizeof(char), c->signature_str->len, in commit()
269 c->defines_file); in commit()
270 fprintf(c->defines_file, ";\n"); in commit()
293 rvalue.tmp.index = c->inst.tmp_count; in gen_constant()
294 OUT(c, locp, "TCGv_i", &bit_width, " tmp_", &c->inst.tmp_count, in gen_constant()
296 c->inst.tmp_count++; in gen_constant()
313 rvalue.tmp.index = c->inst.tmp_count; in gen_tmp()
314 OUT(c, locp, "TCGv_i", &bit_width, " tmp_", &c->inst.tmp_count, in gen_tmp()
316 c->inst.tmp_count++; in gen_tmp()
325 assert(value->type == IMMEDIATE); in gen_constant_from_imm()
328 rvalue.bit_width = value->bit_width; in gen_constant_from_imm()
329 rvalue.signedness = value->signedness; in gen_constant_from_imm()
331 rvalue.tmp.index = c->inst.tmp_count; in gen_constant_from_imm()
333 * Here we output the call to `tcg_constant_i<width>` in in gen_constant_from_imm()
337 * `tcg_constant_i<width>`((int<width>_t) ...)` in gen_constant_from_imm()
342 * integer is 32-bit. in gen_constant_from_imm()
344 OUT(c, locp, "TCGv_i", &rvalue.bit_width, " tmp_", &c->inst.tmp_count); in gen_constant_from_imm()
348 c->inst.tmp_count++; in gen_constant_from_imm()
383 rvalue.imm.index = c->inst.qemu_tmp_count++; in gen_imm_qemu_tmp()
389 if (rvalue->type == IMMEDIATE) { in rvalue_materialize()
397 assert_signedness(c, locp, rvalue->signedness); in gen_rvalue_extend()
398 if (rvalue->bit_width > 32) { in gen_rvalue_extend()
402 if (rvalue->type == IMMEDIATE) { in gen_rvalue_extend()
403 HexValue res = gen_imm_qemu_tmp(c, locp, 64, rvalue->signedness); in gen_rvalue_extend()
404 gen_c_int_type(c, locp, 64, rvalue->signedness); in gen_rvalue_extend()
406 gen_c_int_type(c, locp, 64, rvalue->signedness); in gen_rvalue_extend()
410 HexValue res = gen_tmp(c, locp, 64, rvalue->signedness); in gen_rvalue_extend()
411 bool is_unsigned = (rvalue->signedness == UNSIGNED); in gen_rvalue_extend()
421 if (rvalue->type == IMMEDIATE) { in gen_rvalue_truncate()
426 if (rvalue->bit_width == 64) { in gen_rvalue_truncate()
427 HexValue res = gen_tmp(c, locp, 32, rvalue->signedness); in gen_rvalue_truncate()
438 * signedness, given that `dst` is non-NULL. Returns true if the lookup
446 yyassert(c, locp, varid->type == VARID, in try_find_variable()
448 for (unsigned i = 0; i < c->inst.allocated->len; i++) { in try_find_variable()
449 Var *curr = &g_array_index(c->inst.allocated, Var, i); in try_find_variable()
450 if (g_string_equal(varid->var.name, curr->name)) { in try_find_variable()
452 dst->var.name = curr->name; in try_find_variable()
453 dst->bit_width = curr->bit_width; in try_find_variable()
454 dst->signedness = curr->signedness; in try_find_variable()
471 /* Handle signedness, if both unsigned -> result is unsigned, else signed */
497 new_var.name = varid->var.name; in gen_varid_allocate()
501 EMIT_HEAD(c, "TCGv_%s %s", bit_suffix, varid->var.name->str); in gen_varid_allocate()
503 g_array_append_val(c->inst.allocated, new_var); in gen_varid_allocate()
529 /* Extend to 64-bits, if required */ in gen_bin_cmp()
571 op1->signedness, in gen_simple_op()
572 op2->signedness); in gen_simple_op()
600 op1->signedness, in gen_sub_op()
601 op2->signedness); in gen_sub_op()
604 " = ", op1, " - ", op2, ";\n"); in gen_sub_op()
631 op1->signedness, in gen_asl_op()
632 op2->signedness); in gen_asl_op()
656 * Handle left shift by 64/32 which hexagon-sim expects to clear out in gen_asl_op()
688 op1->signedness, in gen_asr_op()
689 op2->signedness); in gen_asr_op()
694 OUT(c, locp, " shift = ", &bit_width, " - 1;\n"); in gen_asr_op()
772 * We do not short-circuit logical expressions!
804 const char *mm; in gen_minmax_op() local
809 assert_signedness(c, locp, res->signedness); in gen_minmax_op()
810 is_unsigned = res->signedness == UNSIGNED; in gen_minmax_op()
814 mm = is_unsigned ? "tcg_gen_umax" : "tcg_gen_smax"; in gen_minmax_op()
817 mm = is_unsigned ? "tcg_gen_umin" : "tcg_gen_smin"; in gen_minmax_op()
826 OUT(c, locp, mm, "_i", &bit_width, "("); in gen_minmax_op()
834 OUT(c, locp, mm, "_i", &bit_width, "("); in gen_minmax_op()
883 /* Extend to 64-bits, if required */ in gen_bin_op()
975 assert_signedness(c, locp, src->signedness); in gen_cast_op()
976 if (src->bit_width == target_width) { in gen_cast_op()
978 } else if (src->bit_width < target_width) { in gen_cast_op()
981 /* src->bit_width > target_width */ in gen_cast_op()
1003 * If the source width is not an immediate value, we need to guard in gen_extend_imm_width_op()
1012 assert(src_width->type == IMMEDIATE); in gen_extend_imm_width_op()
1015 need_guarding = (src_width->imm.type != VALUE); in gen_extend_imm_width_op()
1017 if (src_width->imm.type == VALUE && in gen_extend_imm_width_op()
1018 src_width->imm.value == 0) { in gen_extend_imm_width_op()
1020 * We can bail out early if the source width is known to be zero in gen_extend_imm_width_op()
1026 if (value->type == IMMEDIATE) { in gen_extend_imm_width_op()
1028 * If both the value and source width are immediates, in gen_extend_imm_width_op()
1046 * If the source width is an immediate and the value to in gen_extend_imm_width_op()
1052 * If the width is an immediate value we know it is non-zero in gen_extend_imm_width_op()
1053 * at this point, otherwise we need an if-statement in gen_extend_imm_width_op()
1090 assert(src_width->type != IMMEDIATE); in gen_extend_tcg_width_op()
1097 HexValue mask = gen_constant(c, locp, "-1", dst_width, UNSIGNED); in gen_extend_tcg_width_op()
1151 * Implements `rdeposit` for the special case where `width`
1156 * `width` is _NEVER_ of IMMEDIATE type.
1163 HexValue *width) in gen_rdeposit_op() argument
1166 * Otherwise if the width is not known, we fallback on reimplementing in gen_rdeposit_op()
1171 HexValue width_m = *width; in gen_rdeposit_op()
1172 const char *mask_str = (dst->bit_width == 32) in gen_rdeposit_op()
1175 HexValue mask = gen_constant(c, locp, mask_str, dst->bit_width, in gen_rdeposit_op()
1177 const char *dst_width_str = (dst->bit_width == 32) ? "32" : "64"; in gen_rdeposit_op()
1178 HexValue k64 = gen_constant(c, locp, dst_width_str, dst->bit_width, in gen_rdeposit_op()
1183 assert(dst->bit_width >= value->bit_width); in gen_rdeposit_op()
1184 assert(begin->type == IMMEDIATE && begin->imm.type == VALUE); in gen_rdeposit_op()
1185 assert(dst->type == REGISTER_ARG); in gen_rdeposit_op()
1187 yyassert(c, locp, width->type != IMMEDIATE, in gen_rdeposit_op()
1190 yyassert(c, locp, value_m.bit_width == dst->bit_width && in gen_rdeposit_op()
1191 begin_m.bit_width == dst->bit_width && in gen_rdeposit_op()
1192 width_m.bit_width == dst->bit_width, in gen_rdeposit_op()
1199 * mask = 0xffffffffffffffff >> (64 - width) in gen_rdeposit_op()
1204 * dst = (width != 0) ? res : dst in gen_rdeposit_op()
1212 OUT(c, locp, "tcg_gen_not_i", &dst->bit_width, "(", &mask, ", ", in gen_rdeposit_op()
1219 * the same bit width. in gen_rdeposit_op()
1222 /* If the width is zero, then return the identity dst = dst */ in gen_rdeposit_op()
1238 unsigned bit_width = (dst->bit_width == 64) ? 64 : 32; in gen_deposit_op()
1239 unsigned width = cast->bit_width; in gen_deposit_op() local
1241 yyassert(c, locp, index->type == IMMEDIATE, in gen_deposit_op()
1251 if (dst->bit_width != value->bit_width) { in gen_deposit_op()
1260 OUT(c, locp, &value_m, ", ", index, " * ", &width, ", ", &width, ");\n"); in gen_deposit_op()
1267 unsigned width) in gen_rextract_op() argument
1269 unsigned bit_width = (src->bit_width == 64) ? 64 : 32; in gen_rextract_op()
1272 OUT(c, locp, ", ", src, ", ", &begin, ", ", &width, ");\n"); in gen_rextract_op()
1282 unsigned bit_width = (src->bit_width == 64) ? 64 : 32; in gen_extract_op()
1283 unsigned width = extract->bit_width; in gen_extract_op() local
1287 yyassert(c, locp, index->type == IMMEDIATE, in gen_extract_op()
1289 assert_signedness(c, locp, extract->signedness); in gen_extract_op()
1291 sign_prefix = (extract->signedness == UNSIGNED) ? "" : "s"; in gen_extract_op()
1292 res = gen_tmp(c, locp, bit_width, extract->signedness); in gen_extract_op()
1296 OUT(c, locp, ", ", index, " * ", &width, ", ", &width, ");\n"); in gen_extract_op()
1299 if (extract->storage_bit_width > bit_width) { in gen_extract_op()
1300 HexValue tmp = gen_tmp(c, locp, extract->storage_bit_width, in gen_extract_op()
1301 extract->signedness); in gen_extract_op()
1302 const char *sign_suffix = (extract->signedness == UNSIGNED) ? "u" : ""; in gen_extract_op()
1313 yyassert(c, locp, reg->type == REGISTER, "reg must be a register!"); in gen_write_reg()
1318 "gen_log_reg_write(ctx, ", &reg->reg.id, ", ", in gen_write_reg()
1333 if (dst->type == REGISTER) { in gen_assign()
1338 if (dst->type == VARID) { in gen_assign()
1341 bit_width = dst->bit_width == 64 ? 64 : 32; in gen_assign()
1363 HexValue res = gen_tmp(c, locp, bit_width, src->signedness); in gen_convround()
1389 assert(n->type != IMMEDIATE); in gen_convround_n_b()
1439 HexValue src_casted = gen_cast_op(c, locp, src, 32, src->signedness); in gen_convround_n()
1440 HexValue pos_casted = gen_cast_op(c, locp, pos, 32, pos->signedness); in gen_convround_n()
1450 * - r1 picked if pos_casted == 0 in gen_convround_n()
1451 * - r2 picked if (src_casted & ((1 << (pos_casted - 1)) - 1)) == 0), in gen_convround_n()
1452 * that is if bits 0, ..., pos_casted-1 are all 0. in gen_convround_n()
1453 * - r3 picked otherwise. in gen_convround_n()
1461 * (src_casted & ((1 << (pos_casted - 1)) - 1)) == 0), in gen_convround_n()
1462 * which checks if the bits 0,...,pos-1 are all 0. in gen_convround_n()
1477 * if the bits 0, ..., pos_casted-1 are all 0, then pick r2 otherwise, in gen_convround_n()
1512 assert_signedness(c, locp, src->signedness); in gen_round()
1513 yyassert(c, locp, src->bit_width <= 32, in gen_round()
1516 res = gen_tmp(c, locp, 64, src->signedness); in gen_round()
1518 src_width = gen_imm_value(c, locp, src->bit_width, 32, UNSIGNED); in gen_round()
1537 /* Circular addressing mode with auto-increment */
1561 const char *bit_suffix = src->bit_width == 64 ? "64" : "32"; in gen_locnt_op()
1565 assert_signedness(c, locp, src->signedness); in gen_locnt_op()
1566 res = gen_tmp(c, locp, src->bit_width == 64 ? 64 : 32, src->signedness); in gen_locnt_op()
1577 const char *bit_suffix = src->bit_width == 64 ? "64" : "32"; in gen_ctpop_op()
1580 assert_signedness(c, locp, src->signedness); in gen_ctpop_op()
1581 res = gen_tmp(c, locp, src->bit_width == 64 ? 64 : 32, src->signedness); in gen_ctpop_op()
1588 HexValue gen_rotl(Context *c, YYLTYPE *locp, HexValue *src, HexValue *width) in gen_rotl() argument
1590 const char *suffix = src->bit_width == 64 ? "i64" : "i32"; in gen_rotl()
1591 HexValue amount = *width; in gen_rotl()
1593 assert_signedness(c, locp, src->signedness); in gen_rotl()
1594 res = gen_tmp(c, locp, src->bit_width, src->signedness); in gen_rotl()
1595 if (amount.bit_width < src->bit_width) { in gen_rotl()
1644 c->total_insn++; in gen_inst()
1645 c->inst.name = iname; in gen_inst()
1646 c->inst.allocated = g_array_new(FALSE, FALSE, sizeof(Var)); in gen_inst()
1647 c->inst.init_list = g_array_new(FALSE, FALSE, sizeof(HexValue)); in gen_inst()
1648 c->inst.strings = g_array_new(FALSE, FALSE, sizeof(GString *)); in gen_inst()
1650 c->inst.name->str); in gen_inst()
1665 if (!c->inst.init_list) { in gen_inst_init_args()
1669 for (unsigned i = 0; i < c->inst.init_list->len; i++) { in gen_inst_init_args()
1670 val = &g_array_index(c->inst.init_list, HexValue, i); in gen_inst_init_args()
1671 suffix = val->is_dotnew ? 'N' : 'V'; in gen_inst_init_args()
1672 yyassert(c, locp, val->type == PREDICATE, in gen_inst_init_args()
1674 yyassert(c, locp, val->bit_width == 32, in gen_inst_init_args()
1676 EMIT_HEAD(c, "tcg_gen_movi_i32(P%c%c, 0);\n", val->pred.id, suffix); in gen_inst_init_args()
1680 g_array_free(c->inst.init_list, TRUE); in gen_inst_init_args()
1681 c->inst.init_list = NULL; in gen_inst_init_args()
1686 if (c->inst.error_count != 0) { in gen_inst_code()
1689 c->inst.name->str, in gen_inst_code()
1690 c->inst.error_count); in gen_inst_code()
1692 c->implemented_insn++; in gen_inst_code()
1693 fprintf(c->enabled_file, "%s\n", c->inst.name->str); in gen_inst_code()
1703 char pred_id[2] = {left_pred->pred.id, 0}; in gen_pred_assign()
1723 OUT(c, locp, "gen_cancel(insn->slot);\n"); in gen_cancel()
1728 OUT(c, locp, "if (insn->slot == 0 && pkt->pkt_has_store_s1) {\n"); in gen_load_cancel()
1729 OUT(c, locp, "ctx->s1_store_processed = false;\n"); in gen_load_cancel()
1734 void gen_load(Context *c, YYLTYPE *locp, HexValue *width, in gen_load() argument
1740 /* Memop width is specified in the load macro */ in gen_load()
1744 if (dst->type == VARID) { in gen_load()
1748 src_bit_width = width->imm.value * 8; in gen_load()
1749 dst_bit_width = MAX(dst->bit_width, 32); in gen_load()
1753 OUT(c, locp, "if (insn->slot == 0 && pkt->pkt_has_store_s1) {\n"); in gen_load()
1754 OUT(c, locp, "probe_noshuf_load(", ea, ", ", width, ", ctx->mem_idx);\n"); in gen_load()
1760 OUT(c, locp, dst, ", ", ea, ", ctx->mem_idx, MO_", &src_bit_width); in gen_load()
1767 void gen_store(Context *c, YYLTYPE *locp, HexValue *width, HexValue *ea, in gen_store() argument
1771 /* Memop width is specified in the store macro */ in gen_store()
1772 unsigned mem_width = width->imm.value; in gen_store()
1777 OUT(c, locp, ", insn->slot);\n"); in gen_store()
1783 yyassert(c, locp, n->type == IMMEDIATE, in gen_sethalf()
1785 if (dst->type == VARID) { in gen_sethalf()
1798 yyassert(c, locp, hi->type == IMMEDIATE && in gen_setbits()
1799 hi->imm.type == VALUE && in gen_setbits()
1800 lo->type == IMMEDIATE && in gen_setbits()
1801 lo->imm.type == VALUE, in gen_setbits()
1805 len = hi->imm.value + 1 - lo->imm.value; in gen_setbits()
1806 tmp = gen_tmp(c, locp, 32, value->signedness); in gen_setbits()
1809 /* Use `neg` to map 0 -> 0 and 1 -> 0xffff... */ in gen_setbits()
1820 OUT(c, locp, "TCGLabel *if_label_", &c->inst.if_count, in gen_if_cond()
1823 bit_suffix = (cond->bit_width == 64) ? "i64" : "i32"; in gen_if_cond()
1825 ", 0, if_label_", &c->inst.if_count, ");\n"); in gen_if_cond()
1826 return c->inst.if_count++; in gen_if_cond()
1831 unsigned if_index = c->inst.if_count++; in gen_if_else()
1848 bool is_dotnew = pred->is_dotnew; in gen_rvalue_pred()
1849 char predicate_id[2] = { pred->pred.id, '\0' }; in gen_rvalue_pred()
1854 ", ctx->new_pred_value["); in gen_rvalue_pred()
1876 assert_signedness(c, locp, mpy->first_signedness); in gen_rvalue_mpy()
1877 assert_signedness(c, locp, mpy->second_signedness); in gen_rvalue_mpy()
1879 *op1 = gen_cast_op(c, locp, op1, mpy->first_bit_width * 2, in gen_rvalue_mpy()
1880 mpy->first_signedness); in gen_rvalue_mpy()
1882 if (mpy->first_bit_width == 32) { in gen_rvalue_mpy()
1883 *op2 = gen_cast_op(c, locp, op2, 64, mpy->second_signedness); in gen_rvalue_mpy()
1885 *op2 = gen_cast_op(c, locp, op2, mpy->second_bit_width * 2, in gen_rvalue_mpy()
1886 mpy->second_signedness); in gen_rvalue_mpy()
1890 if (mpy->first_bit_width == 16 && mpy->second_bit_width == 16) { in gen_rvalue_mpy()
1893 mpy->first_signedness, in gen_rvalue_mpy()
1894 mpy->second_signedness); in gen_rvalue_mpy()
1906 unsigned bit_width = (value->bit_width == 64) ? 64 : 32; in gen_rvalue_simple_unary()
1908 if (value->type == IMMEDIATE) { in gen_rvalue_simple_unary()
1909 res = gen_imm_qemu_tmp(c, locp, bit_width, value->signedness); in gen_rvalue_simple_unary()
1910 gen_c_int_type(c, locp, value->bit_width, value->signedness); in gen_rvalue_simple_unary()
1913 res = gen_tmp(c, locp, bit_width, value->signedness); in gen_rvalue_simple_unary()
1928 unsigned bit_width = (value->bit_width == 64) ? 64 : 32; in gen_rvalue_notl()
1930 if (value->type == IMMEDIATE) { in gen_rvalue_notl()
1931 res = gen_imm_qemu_tmp(c, locp, bit_width, value->signedness); in gen_rvalue_notl()
1932 gen_c_int_type(c, locp, value->bit_width, value->signedness); in gen_rvalue_notl()
1937 res = gen_tmp(c, locp, bit_width, value->signedness); in gen_rvalue_notl()
1946 HexValue *width, HexValue *value) in gen_rvalue_sat() argument
1949 const char *bit_suffix = (value->bit_width == 64) ? "i64" : "i32"; in gen_rvalue_sat()
1955 * by idef-parser. in gen_rvalue_sat()
1957 yyassert(c, locp, width->imm.value < value->bit_width, in gen_rvalue_sat()
1958 "To compute overflow, source width must be greater than" in gen_rvalue_sat()
1959 " saturation width!"); in gen_rvalue_sat()
1962 assert_signedness(c, locp, sat->signedness); in gen_rvalue_sat()
1964 unsigned_str = (sat->signedness == UNSIGNED) ? "u" : ""; in gen_rvalue_sat()
1965 res = gen_tmp(c, locp, value->bit_width, sat->signedness); in gen_rvalue_sat()
1966 ovfl = gen_tmp(c, locp, 32, sat->signedness); in gen_rvalue_sat()
1968 OUT(c, locp, &ovfl, ", ", &res, ", ", value, ", ", &width->imm.value, in gen_rvalue_sat()
1995 return gen_rvalue_simple_unary(c, locp, value, "-", "tcg_gen_neg"); in gen_rvalue_neg()
2001 yyassert(c, locp, value->bit_width <= 32, in gen_rvalue_brev()
2002 "fbrev not implemented for 64-bit integers!"); in gen_rvalue_brev()
2003 res = gen_tmp(c, locp, value->bit_width, value->signedness); in gen_rvalue_brev()
2012 bool is_64bit = (true_branch->bit_width == 64) || in gen_rvalue_ternary()
2013 (false_branch->bit_width == 64); in gen_rvalue_ternary()
2033 assert(c->ternary->len > 0); in gen_rvalue_ternary()
2034 g_array_remove_index(c->ternary, c->ternary->len - 1); in gen_rvalue_ternary()
2073 switch (arg->type) { in emit_arg()
2075 if (arg->reg.type == DOTNEW) { in emit_arg()
2076 EMIT_SIG(c, ", TCGv N%cN", arg->reg.id); in emit_arg()
2078 bool is64 = (arg->bit_width == 64); in emit_arg()
2081 reg_compose(c, locp, &(arg->reg), reg_id); in emit_arg()
2084 if (arg->reg.type == MODIFIER) { in emit_arg()
2091 char suffix = arg->is_dotnew ? 'N' : 'V'; in emit_arg()
2092 EMIT_SIG(c, ", TCGv P%c%c", arg->pred.id, suffix); in emit_arg()
2111 g_array_append_val(c->inst.strings, s); in track_string()
2118 g_string_truncate(c->signature_str, 0); in free_instruction()
2119 g_string_truncate(c->out_str, 0); in free_instruction()
2120 g_string_truncate(c->header_str, 0); in free_instruction()
2122 for (unsigned i = 0; i < c->inst.strings->len; i++) { in free_instruction()
2123 g_string_free(g_array_index(c->inst.strings, GString*, i), TRUE); in free_instruction()
2125 g_array_free(c->inst.strings, TRUE); in free_instruction()
2130 if (c->inst.init_list) { in free_instruction()
2131 g_array_free(c->inst.init_list, TRUE); in free_instruction()
2134 g_string_free(c->inst.name, TRUE); in free_instruction()
2136 g_array_free(c->inst.allocated, TRUE); in free_instruction()
2137 /* Initialize instruction-specific portion of the context */ in free_instruction()
2138 memset(&(c->inst), 0, sizeof(Inst)); in free_instruction()