| H A D | parser-helpers.c | 2 * Copyright(c) 2019-2023 rev.ng Labs Srl. All Rights Reserved. 35 Context *c, in yyerror() argument 38 const char *code_ptr = c->input_buffer; in yyerror() 40 fprintf(stderr, "WARNING (%s): '%s'\n", c->inst.name->str, s); in yyerror() 45 fprintf(stderr, "%c", code_ptr[i]); in yyerror() 55 fprintf(stderr, "%c", code_ptr[locp->first_column - 10 + i]); in yyerror() 66 c->inst.error_count++; in yyerror() 74 bool is_inside_ternary(Context *c) in is_inside_ternary() argument 76 return c->ternary->len > 0; in is_inside_ternary() 80 void str_print(Context *c, YYLTYP argument 86 uint8_print(Context * c,YYLTYPE * locp,uint8_t * num) uint8_print() argument 92 uint64_print(Context * c,YYLTYPE * locp,uint64_t * num) uint64_print() argument 98 int_print(Context * c,YYLTYPE * locp,int * num) int_print() argument 104 uint_print(Context * c,YYLTYPE * locp,unsigned * num) uint_print() argument 110 tmp_print(Context * c,YYLTYPE * locp,HexTmp * tmp) tmp_print() argument 116 pred_print(Context * c,YYLTYPE * locp,HexPred * pred,bool is_dotnew) pred_print() argument 123 reg_compose(Context * c,YYLTYPE * locp,HexReg * reg,char reg_id[5]) reg_compose() argument 157 reg_arg_print(Context * c,YYLTYPE * locp,HexReg * reg) reg_arg_print() argument 164 reg_print(Context * c,YYLTYPE * locp,HexReg * reg) reg_print() argument 170 imm_print(Context * c,YYLTYPE * locp,HexValue * rvalue) imm_print() argument 211 var_print(Context * c,YYLTYPE * locp,HexVar * var) var_print() argument 217 rvalue_print(Context * c,YYLTYPE * locp,void * pointer) rvalue_print() argument 244 out_assert(Context * c,YYLTYPE * locp,void * dummy) out_assert() argument 251 commit(Context * c) commit() argument 273 gen_c_int_type(Context * c,YYLTYPE * locp,unsigned bit_width,HexSignedness signedness) gen_c_int_type() argument 280 gen_constant(Context * c,YYLTYPE * locp,const char * value,unsigned bit_width,HexSignedness signedness) gen_constant() argument 301 gen_tmp(Context * c,YYLTYPE * locp,unsigned bit_width,HexSignedness signedness) gen_tmp() argument 320 gen_constant_from_imm(Context * c,YYLTYPE * locp,HexValue * value) gen_constant_from_imm() argument 352 gen_imm_value(Context * c,YYLTYPE * locp,int value,unsigned bit_width,HexSignedness signedness) gen_imm_value() argument 371 gen_imm_qemu_tmp(Context * c,YYLTYPE * locp,unsigned bit_width,HexSignedness signedness) gen_imm_qemu_tmp() argument 387 rvalue_materialize(Context * c,YYLTYPE * locp,HexValue * rvalue) rvalue_materialize() argument 395 gen_rvalue_extend(Context * c,YYLTYPE * locp,HexValue * rvalue) gen_rvalue_extend() argument 419 gen_rvalue_truncate(Context * c,YYLTYPE * locp,HexValue * rvalue) gen_rvalue_truncate() argument 441 try_find_variable(Context * c,YYLTYPE * locp,HexValue * dst,HexValue * varid) try_find_variable() argument 463 find_variable(Context * c,YYLTYPE * locp,HexValue * dst,HexValue * varid) find_variable() argument 472 bin_op_signedness(Context * c,YYLTYPE * locp,HexSignedness sign1,HexSignedness sign2) bin_op_signedness() argument 481 gen_varid_allocate(Context * c,YYLTYPE * locp,HexValue * varid,unsigned bit_width,HexSignedness signedness) gen_varid_allocate() argument 513 gen_bin_cmp(Context * c,YYLTYPE * locp,TCGCond type,HexValue * op1,HexValue * op2) gen_bin_cmp() argument 558 gen_simple_op(Context * c,YYLTYPE * locp,unsigned bit_width,const char * bit_suffix,HexValue * res,enum OpTypes op_types,HexValue * op1,HexValue * op2,const char * imm_imm,const char * imm_reg,const char * reg_imm,const char * reg_reg) gen_simple_op() argument 592 gen_sub_op(Context * c,YYLTYPE * locp,unsigned bit_width,const char * bit_suffix,HexValue * res,enum OpTypes op_types,HexValue * op1,HexValue * op2) gen_sub_op() argument 621 gen_asl_op(Context * c,YYLTYPE * locp,unsigned bit_width,bool op_is64bit,const char * bit_suffix,HexValue * res,enum OpTypes op_types,HexValue * op1,HexValue * op2) gen_asl_op() argument 673 gen_asr_op(Context * c,YYLTYPE * locp,unsigned bit_width,bool op_is64bit,const char * bit_suffix,HexValue * res,enum OpTypes op_types,HexValue * op1,HexValue * op2) gen_asr_op() argument 728 gen_lsr_op(Context * c,YYLTYPE * locp,unsigned bit_width,bool op_is64bit,const char * bit_suffix,HexValue * res,enum OpTypes op_types,HexValue * op1,HexValue * op2) gen_lsr_op() argument 774 gen_andl_op(Context * c,YYLTYPE * locp,unsigned bit_width,const char * bit_suffix,HexValue * res,enum OpTypes op_types,HexValue * op1,HexValue * op2) gen_andl_op() argument 800 gen_minmax_op(Context * c,YYLTYPE * locp,unsigned bit_width,HexValue * res,enum OpTypes op_types,HexValue * op1,HexValue * op2,bool minmax) gen_minmax_op() argument 841 gen_bin_op(Context * c,YYLTYPE * locp,OpType type,HexValue * op1,HexValue * op2) gen_bin_op() argument 968 gen_cast_op(Context * c,YYLTYPE * locp,HexValue * src,unsigned target_width,HexSignedness signedness) gen_cast_op() argument 995 gen_extend_imm_width_op(Context * c,YYLTYPE * locp,HexValue * src_width,unsigned dst_width,HexValue * value,HexSignedness signedness) gen_extend_imm_width_op() argument 1076 gen_extend_tcg_width_op(Context * c,YYLTYPE * locp,HexValue * src_width,unsigned dst_width,HexValue * value,HexSignedness signedness) gen_extend_tcg_width_op() argument 1116 gen_extend_op(Context * c,YYLTYPE * locp,HexValue * src_width,unsigned dst_width,HexValue * value,HexSignedness signedness) gen_extend_op() argument 1158 gen_rdeposit_op(Context * c,YYLTYPE * locp,HexValue * dst,HexValue * value,HexValue * begin,HexValue * width) gen_rdeposit_op() argument 1230 gen_deposit_op(Context * c,YYLTYPE * locp,HexValue * dst,HexValue * value,HexValue * index,HexCast * cast) gen_deposit_op() argument 1263 gen_rextract_op(Context * c,YYLTYPE * locp,HexValue * src,unsigned begin,unsigned width) gen_rextract_op() argument 1276 gen_extract_op(Context * c,YYLTYPE * locp,HexValue * src,HexValue * index,HexExtract * extract) gen_extract_op() argument 1310 gen_write_reg(Context * c,YYLTYPE * locp,HexValue * reg,HexValue * value) gen_write_reg() argument 1322 gen_assign(Context * c,YYLTYPE * locp,HexValue * dst,HexValue * value) gen_assign() argument 1356 gen_convround(Context * c,YYLTYPE * locp,HexValue * src) gen_convround() argument 1379 gen_convround_n_b(Context * c,YYLTYPE * locp,HexValue * a,HexValue * n) gen_convround_n_b() argument 1404 gen_convround_n_c(Context * c,YYLTYPE * locp,HexValue * a,HexValue * n) gen_convround_n_c() argument 1426 gen_convround_n(Context * c,YYLTYPE * locp,HexValue * src,HexValue * pos) gen_convround_n() argument 1497 gen_round(Context * c,YYLTYPE * locp,HexValue * src,HexValue * pos) gen_round() argument 1538 gen_circ_op(Context * c,YYLTYPE * locp,HexValue * addr,HexValue * increment,HexValue * modifier) gen_circ_op() argument 1559 gen_locnt_op(Context * c,YYLTYPE * locp,HexValue * src) gen_locnt_op() argument 1575 gen_ctpop_op(Context * c,YYLTYPE * locp,HexValue * src) gen_ctpop_op() argument 1588 gen_rotl(Context * c,YYLTYPE * locp,HexValue * src,HexValue * width) gen_rotl() argument 1607 gen_carry_from_add(Context * c,YYLTYPE * locp,HexValue * op1,HexValue * op2,HexValue * op3) gen_carry_from_add() argument 1630 gen_addsat64(Context * c,YYLTYPE * locp,HexValue * dst,HexValue * op1,HexValue * op2) gen_addsat64() argument 1642 gen_inst(Context * c,GString * iname) gen_inst() argument 1659 gen_inst_init_args(Context * c,YYLTYPE * locp) gen_inst_init_args() argument 1684 gen_inst_code(Context * c,YYLTYPE * locp) gen_inst_code() argument 1700 gen_pred_assign(Context * c,YYLTYPE * locp,HexValue * left_pred,HexValue * right_pred) gen_pred_assign() argument 1721 gen_cancel(Context * c,YYLTYPE * locp) gen_cancel() argument 1726 gen_load_cancel(Context * c,YYLTYPE * locp) gen_load_cancel() argument 1734 gen_load(Context * c,YYLTYPE * locp,HexValue * width,HexSignedness signedness,HexValue * ea,HexValue * dst) gen_load() argument 1767 gen_store(Context * c,YYLTYPE * locp,HexValue * width,HexValue * ea,HexValue * src) gen_store() argument 1780 gen_sethalf(Context * c,YYLTYPE * locp,HexCast * sh,HexValue * n,HexValue * dst,HexValue * value) gen_sethalf() argument 1792 gen_setbits(Context * c,YYLTYPE * locp,HexValue * hi,HexValue * lo,HexValue * dst,HexValue * value) gen_setbits() argument 1816 gen_if_cond(Context * c,YYLTYPE * locp,HexValue * cond) gen_if_cond() argument 1829 gen_if_else(Context * c,YYLTYPE * locp,unsigned index) gen_if_else() argument 1842 gen_rvalue_pred(Context * c,YYLTYPE * locp,HexValue * pred) gen_rvalue_pred() argument 1864 gen_rvalue_var(Context * c,YYLTYPE * locp,HexValue * var) gen_rvalue_var() argument 1870 gen_rvalue_mpy(Context * c,YYLTYPE * locp,HexMpy * mpy,HexValue * op1,HexValue * op2) gen_rvalue_mpy() argument 1901 gen_rvalue_simple_unary(Context * c,YYLTYPE * locp,HexValue * value,const char * c_code,const char * tcg_code) gen_rvalue_simple_unary() argument 1921 gen_rvalue_not(Context * c,YYLTYPE * locp,HexValue * value) gen_rvalue_not() argument 1926 gen_rvalue_notl(Context * c,YYLTYPE * locp,HexValue * value) gen_rvalue_notl() argument 1945 gen_rvalue_sat(Context * c,YYLTYPE * locp,HexSat * sat,HexValue * width,HexValue * value) gen_rvalue_sat() argument 1975 gen_rvalue_fscr(Context * c,YYLTYPE * locp,HexValue * value) gen_rvalue_fscr() argument 1988 gen_rvalue_abs(Context * c,YYLTYPE * locp,HexValue * value) gen_rvalue_abs() argument 1993 gen_rvalue_neg(Context * c,YYLTYPE * locp,HexValue * value) gen_rvalue_neg() argument 1998 gen_rvalue_brev(Context * c,YYLTYPE * locp,HexValue * value) gen_rvalue_brev() argument 2009 gen_rvalue_ternary(Context * c,YYLTYPE * locp,HexValue * cond,HexValue * true_branch,HexValue * false_branch) gen_rvalue_ternary() argument 2071 emit_arg(Context * c,YYLTYPE * locp,HexValue * arg) emit_arg() argument 2103 emit_footer(Context * c) emit_footer() argument 2109 track_string(Context * c,GString * s) track_string() argument 2114 free_instruction(Context * c) free_instruction() argument 2141 assert_signedness(Context * c,YYLTYPE * locp,HexSignedness signedness) assert_signedness() argument [all...] |