#include <alloca.h>#include "whirl2c_common.h"#include "mempool.h"#include "const.h"#include "pf_cg.h"#include "region_util.h"#include "w2cf_parentize.h"#include "PUinfo.h"#include "wn2c.h"#include "wn2c_pragma.h"#include "st2c.h"#include "ty2c.h"#include "tcon2c.h"#include "ir_reader.h"#include "inttypes.h"#include "stdarg.h"#include <set>#include <vector>

Go to the source code of this file.
| #define NUMBER_OF_OPC2CNAME_MAPS sizeof(WN2C_Opc2cname_Map) / sizeof(OPC2CNAME_MAP) |
| #define NUMBER_OF_OPERATORS (OPERATOR_LAST + 1) |
| #define NUMBER_OF_OPR2HANDLER_MAPS (sizeof(WN2C_Opr_Handler_Map) / sizeof(OPR2HANDLER)) |
| #define OPR_LOC OPERATOR_LAST+12 |
Referenced by WN2C_translate().
Value:
Definition at line 125 of file wn2c.cxx.
Referenced by WN2C_Append_Preg(), WN2C_based_lvalue(), WN2C_cvtl(), WN2C_iload(), WN2C_iloadx(), WN2C_intrinsic_op(), WN2C_lda(), WN2C_ldid(), and WN2C_Translate_Arithmetic_Operand().
| #define WN2C_array_lvalue_as_ptr | ( | ptr_to_array, | |||
| ptr | ) |
Value:
(TY_Is_Pointer(ptr) && \ TY_Is_Pointer(ptr_to_array) && \ TY_Is_Array(TY_pointed(ptr_to_array)) && \ WN2C_arithmetic_compatible_types(TY_AR_etype(TY_pointed(ptr_to_array)), \ TY_pointed(ptr)))
Definition at line 137 of file wn2c.cxx.
Referenced by WN2C_based_lvalue().
Value:
Stab_Assignment_Compatible_Types(lhs_ty, rhs_ty, \ FALSE, /*check_quals*/ \ FALSE, /*check_scalars*/ \ FALSE)
Definition at line 113 of file wn2c.cxx.
Referenced by WN2C_Append_Assignment(), WN2C_based_lvalue(), WN2C_Function_Call_Lhs(), WN2C_Function_Return_Value(), WN2C_lvalue_wn(), and WN2C_parm().
Value:
Stab_Assignment_Compatible_Types(lhs_ty, rhs_ty, \ FALSE, /*check_quals*/ \ TRUE, /*check_scalars*/ \ FALSE)
Definition at line 119 of file wn2c.cxx.
Referenced by WN2C_based_lvalue(), WN2C_MemAccess_Type(), and WN2C_SymAccess_Type().
| #define WN2C_IS_FUNCALL_OP | ( | opc | ) | ((WN2C_Opc2cname[opc]!=NULL)? (WN2C_Opc2cname[opc][0]=='_') : FALSE) |
| #define WN2C_IS_INFIX_OP | ( | opc | ) | ((WN2C_Opc2cname[opc]!=NULL)? (WN2C_Opc2cname[opc][0]!='_') : FALSE) |
| #define WN2C_MAX_FLD_LEVEL 10 |
Definition at line 104 of file wn2c.cxx.
Referenced by WN2C_Is_Loop_Region(), WN2C_pragma_list_end(), WN2C_process_pragma(), WN2F_Is_Loop_Region(), WN2F_pragma_list_end(), and WN2F_process_pragma().
| typedef struct Opc2Cname_Map OPC2CNAME_MAP |
| typedef struct Opr2handler OPR2HANDLER |
| typedef STATUS(* WN2C_HANDLER_FUNC)(TOKEN_BUFFER, const WN *, CONTEXT) |
| static void Append_Cplus_Initialization | ( | TOKEN_BUFFER | tokens, | |
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3562 of file wn2c.cxx.
References Append_Token_String(), CONTEXT_srcpos, and WN2C_Stmt_Newline().
Referenced by WN2C_block().
| static FLD_HANDLE get_to_field_with_name | ( | TY_IDX | struct_ty_idx, | |
| UINT | field_id, | |||
| UINT & | cur_field_id, | |||
| FLD_list * | fld_stack | |||
| ) | [static] |
Definition at line 1999 of file wn2c.cxx.
References FLD_list::ar, FLD_last_field(), FLD_type, FmtAssert, Get_Inner_Array_Type(), KIND_ARRAY, KIND_STRUCT, Make_fld_iter(), FLD_list::size, TY_fld, TY_Is_Structured(), and TY_kind.
Referenced by WN2C_array(), and WN2C_Gen_Field_Access().
| static void translator_warning | ( | const char * | str, | |
| ... | ||||
| ) | [static] |
Definition at line 1216 of file wn2c.cxx.
References dirname, fprintf(), IR_Srcpos_Filename(), last_source_line, USRCPOS_linenum, USRCPOS_srcpos, va_end, va_start, and vfprintf().
| static STATUS WN2C_address_add | ( | TOKEN_BUFFER | tokens, | |
| OPCODE | opcode, | |||
| TY_IDX | expr_ty, | |||
| WN * | wn0, | |||
| WN * | wn1, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 1401 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), BOOL, CONTEXT_given_lvalue_ty, CONTEXT_lvalue_type, CONTEXT_reset_lvalue_type, CONTEXT_reset_needs_lvalue, CONTEXT_reset_ptr_arith, CONTEXT_reset_top_level_expr, CONTEXT_set_lvalue_type, CONTEXT_set_ptr_arith, CONTEXT_top_level_expr, EMPTY_STATUS, FALSE, Is_True, MTYPE_U1, NULL, OPCODE_operator(), OPR_ADD, OPR_INTCONST, Stab_Mtype_To_Ty(), Stab_Pointer_To(), TRUE, TY_Is_Pointer(), TY_Is_Structured(), TY_pointed, TY_size, UINT64, WN2C_append_cast(), WN2C_lvalue_wn(), WN2C_Translate_Arithmetic_Operand(), WN_const_val(), WN_Get_PtrAdd_Intconst(), WN_operator(), and WN_Tree_Type().
Referenced by WN2C_infix_op().
| static STATUS WN2C_agoto | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4534 of file wn2c.cxx.
References Append_Token_String(), EMPTY_STATUS, Is_True, OPR_AGOTO, OPR_CVT, OPR_ILOAD, OPR_INTCONST, OPR_LDA_LABEL, OPR_LDID, WN2C_cvt(), WN2C_iload(), WN2C_intconst(), WN2C_lda_label(), WN2C_ldid(), WN_kid0(), and WN_operator().
| static STATUS WN2C_alloca | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6708 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), STATUS, WN2C_translate(), and WN_kid0().
| static STATUS WN2C_altentry | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4559 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), EMPTY_STATUS, Is_True, OPR_ALTENTRY, ST_name, WN_operator(), and WN_st().
| static void WN2C_append_addr_plus_const | ( | TOKEN_BUFFER | tokens, | |
| INT64 | element_size, | |||
| STAB_OFFSET | byte_offset | |||
| ) | [static] |
Definition at line 1938 of file wn2c.cxx.
References Append_Token_Special(), Host_To_Targ(), Is_True, MTYPE_I8, TCON2C_translate(), and WHIRL2C_parenthesize().
Referenced by WN2C_based_lvalue(), and WN2C_ptr_array_wn().
| static void WN2C_append_addr_plus_expr | ( | TOKEN_BUFFER | tokens, | |
| INT64 | element_size, | |||
| TOKEN_BUFFER * | byte_offset | |||
| ) | [static] |
Definition at line 1967 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Host_To_Targ(), Is_True, MTYPE_I8, TCON2C_translate(), and WHIRL2C_parenthesize().
Referenced by WN2C_array(), and WN2C_Load_From_PregIdx().
| static void WN2C_Append_Assignment | ( | TOKEN_BUFFER | tokens, | |
| TOKEN_BUFFER * | lhs_tokens, | |||
| const WN * | rhs, | |||
| TY_IDX | assign_ty, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2621 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), CONTEXT_srcpos, FALSE, New_Token_Buffer(), Prepend_Token_Special(), rhs_ty, ST2C_Declare_Tempvar(), Stab_Lock_Tmpvar(), Stab_Unlock_Tmpvar(), TRUE, TY_Is_Structured(), UINT, void, W2CF_Symtab_Nameof_Tempvar(), WHIRL2C_parenthesize(), WN2C_assignment_compatible_types, WN2C_prepend_cast(), WN2C_Stmt_Newline(), WN2C_translate(), and WN_Tree_Type().
Referenced by WN2C_istore(), WN2C_istorex(), WN2C_mstore(), and WN2C_stid().
| static void WN2C_append_cast | ( | TOKEN_BUFFER | tokens, | |
| TY_IDX | cast_to, | |||
| BOOL | pointer_to_type | |||
| ) | [static] |
Definition at line 1327 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), and WN2C_generate_cast().
Referenced by WN2C_address_add(), and WN2C_mstore().
| static void WN2C_append_label_name | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn | |||
| ) | [static] |
Definition at line 2723 of file wn2c.cxx.
References Append_Token_String(), WHIRL2C_number_as_c_name, and WN_label_number().
Referenced by WN2C_condbr(), WN2C_goto(), WN2C_label(), and WN2C_lda_label().
| static void WN2C_Append_Pragma_Newline | ( | TOKEN_BUFFER | tokens, | |
| SRCPOS | srcpos | |||
| ) | [static] |
Definition at line 3394 of file wn2c.cxx.
References Current_Indentation(), Set_Current_Indentation(), UINT, and WN2C_Stmt_Newline().
Referenced by Append_Clause_Newline(), Emit_To_PUinfo_Pragmas(), WN2C_Callsite_Directives(), WN2C_process_pragma(), and WN2C_region().
| static void WN2C_Append_Preg | ( | TOKEN_BUFFER | tokens, | |
| const ST * | st, | |||
| PREG_IDX | preg_idx, | |||
| TY_IDX | ty, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2534 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CLASS_PREG, FALSE, Is_True, New_Token_Buffer(), PUinfo_Preg_Type(), ST2C_Use_Preg(), ST_sym_class(), ST_type, Stab_Mtype_To_Ty(), TY_Is_Pointer(), TY_mtype, WN2C_arithmetic_compatible_types, and WN2C_prepend_cast().
Referenced by WN2C_ldid(), WN2C_Load_From_PregIdx(), and WN2C_stid_lhs().
| static void WN2C_Append_Prompf_Flag_Newline | ( | TOKEN_BUFFER | tokens | ) | [static] |
Definition at line 3614 of file wn2c.cxx.
References Append_Indented_Newline(), Current_Indentation(), Set_Current_Indentation(), and UINT.
Referenced by WN2C_End_Prompf_Construct(), WN2C_Prompf_Construct_End(), WN2C_Prompf_Construct_Start(), and WN2C_Start_Prompf_Construct().
| void WN2C_Append_Purple_Funcinfo | ( | TOKEN_BUFFER | tokens | ) |
Definition at line 3533 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), EXPORT_INTERNAL, Number_as_String(), PUINFO_FUNC_ST, PUINFO_FUNC_ST_IDX, SCLASS_TEXT, ST_export, ST_sclass, strcmp(), W2C_Object_Name(), and WN2C_Purple_Region_Name.
Referenced by WN2C_block(), WN2C_pragma(), and WN2C_translate_purple_main().
| static void WN2C_Append_Symtab_Consts | ( | TOKEN_BUFFER | tokens, | |
| BOOL | use_const_tab, | |||
| UINT | lines_between_decls, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2766 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Indented_Newline(), Append_Token_Special(), CLASS_CONST, CLASS_VAR, CURRENT_SYMTAB, FOREACH_SYMBOL, New_Token_Buffer(), NULL, ST2C_decl_translate(), ST_is_const_var, ST_sym_class(), W2C_DOTH_FILE, W2C_File, and Write_And_Reclaim_Tokens().
Referenced by WN2C_block(), and WN2C_translate_file_scope_defs().
| static void WN2C_Append_Symtab_Types | ( | TOKEN_BUFFER | tokens, | |
| UINT | lines_between_decls | |||
| ) | [static] |
Definition at line 2734 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Indented_Newline(), Append_Token_Special(), New_Token_Buffer(), NULL, Stab_Reserved_Ty(), TY2C_translate_unqualified(), TY_Is_Structured(), TY_is_translated_to_c, TY_split, Ty_Table, TY_Table_Size(), W2C_DOTH_FILE, W2C_File, and Write_And_Reclaim_Tokens().
Referenced by WN2C_translate_structured_types().
| static void WN2C_Append_Symtab_Vars | ( | TOKEN_BUFFER | tokens, | |
| INT | lines_between_decls, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2812 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Indented_Newline(), Append_Token_Special(), BE_ST_w2fc_referenced(), CLASS_FUNC, CLASS_VAR, CURRENT_SYMTAB, FOREACH_SYMBOL, New_Token_Buffer(), NULL, SCLASS_CPLINIT, SCLASS_FORMAL, SCLASS_FORMAL_REF, ST2C_decl_translate(), ST2C_weakext_translate(), ST_class, ST_is_const_var, ST_is_not_used, ST_is_weak_symbol, ST_pu_type, ST_sclass, ST_sym_class(), ST_type, Stab_External_Def_Linkage(), Stab_Is_Based_At_Common_Or_Equivalence(), Stab_Is_Common_Block(), Stab_Is_Equivalence_Block(), Stab_Reserved_St(), W2C_DOTH_FILE, W2C_File, and Write_And_Reclaim_Tokens().
Referenced by WN2C_block(), and WN2C_translate_file_scope_defs().
| static STATUS WN2C_array | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5521 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), FLD_list::ar, BOOL, buf, Clear_TY_ptr_as_array(), CONTEXT_array_basetype, CONTEXT_given_base_ty, CONTEXT_needs_lvalue, CONTEXT_reset_array_basetype, CONTEXT_reset_needs_lvalue, CONTEXT_reset_top_level_expr, CONTEXT_set_needs_lvalue, CONTEXT_set_top_level_expr, EMPTY_STATUS, FALSE, field_info(), FLD_name, FLD_ofst, FLD_type, FmtAssert, TY2C_Fld_Info::found_fld, Get_Inner_Array_Type(), get_to_field_with_name(), index(), INT32, Integer_type, FLD_HANDLE::Is_Null(), Is_True, KIND_ARRAY, KIND_STRUCT, MTYPE_I1, New_Token_Buffer(), offset, OPR_ADD, OPR_ARRAY, OPR_INTCONST, OPR_LDA, OPR_MPY, Pointer_Mtype, Prepend_Token_Special(), Set_TY_ptr_as_array, FLD_list::size, sprintf(), ST2C_use_translate(), ST_type, Stab_Array_Has_Dynamic_Bounds(), Stab_Mtype_To_Ty(), STATUS, STATUS_is_array_as_address, STATUS_is_lvalue, STATUS_set_array_as_address, STATUS_set_lvalue, tmp, TRUE, TY_AR_etype, TY_etype, TY_Is_Array(), TY_Is_Pointer(), TY_kind, TY_pointed, TY_ptr_as_array, TY_size, Ty_Table, UINT, void, WHIRL2C_parenthesize(), WN2C_append_addr_plus_expr(), WN2C_MAX_FLD_LEVEL, WN2C_Normalize_Idx_To_Onedim(), WN2C_prepend_cast(), WN2C_translate(), WN_Add, WN_array_index, WN_const_val(), WN_element_size(), WN_field_id(), WN_Intconst(), WN_kid0(), WN_kid1(), WN_Mpy, WN_num_dim, WN_offset(), WN_operator(), WN_st(), WN_Ternary(), and WN_Tree_Type().
| static STATUS WN2C_asm_stmt | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
| static void WN2C_Assign_Complex_Const | ( | TOKEN_BUFFER | tokens, | |
| const char * | lhs_name, | |||
| TCON | realpart, | |||
| TCON | imagpart | |||
| ) | [static] |
Definition at line 1337 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), TCON2C_translate(), TY2C_Complex_Imagpart_Name, and TY2C_Complex_Realpart_Name.
Referenced by WN2C_const(), and WN2C_lda().
| static STATUS WN2C_based_lvalue | ( | TOKEN_BUFFER | expr_tokens, | |
| BOOL | expr_is_lvalue, | |||
| TY_IDX | expr_ty, | |||
| TY_IDX | addr_ty, | |||
| TY_IDX | object_ty, | |||
| STAB_OFFSET | addr_offset, | |||
| UINT | field_id = 0 | |||
| ) | [static] |
Definition at line 2081 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), BOOL, EMPTY_STATUS, FALSE, field_info(), FmtAssert, TY2C_Fld_Info::found_fld, Get_Inner_Array_Type(), FLD_HANDLE::Is_Null(), Is_True, KIND_ARRAY, KIND_SCALAR, MTYPE_I1, NULL, Prepend_Token_Special(), TY2C_Fld_Info::select_tokens, Stab_Mtype_To_Ty(), Stab_Pointer_To(), STATUS, STATUS_set_lvalue, TRUE, TY2C_get_field_info(), TY_etype, TY_Is_Array(), TY_is_logical, TY_Is_Pointer(), TY_Is_Structured(), TY_kind, TY_mtype, TY_pointed, TY_size, UINT, WHIRL2C_parenthesize(), WN2C_append_addr_plus_const(), WN2C_arithmetic_compatible_types, WN2C_array_lvalue_as_ptr, WN2C_assignment_compatible_types, WN2C_compatible_lvalues, WN2C_Gen_Const_Array_Index(), WN2C_Gen_Field_Access(), and WN2C_prepend_cast().
Referenced by WN2C_Load_Return_Reg(), WN2C_lvalue_st(), WN2C_lvalue_wn(), and WN2C_Store_Return_Reg().
| static STATUS WN2C_binaryop | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3780 of file wn2c.cxx.
References FALSE, Is_True, STATUS, WN2C_funcall_op(), WN2C_infix_op(), WN2C_IS_FUNCALL_OP, WN2C_IS_INFIX_OP, WN_kid0(), WN_kid1(), WN_kid_count(), WN_opc_name, WN_opcode(), and WN_Tree_Type().
| static STATUS WN2C_block | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3932 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Cplus_Initialization(), Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), BOOL, CLASS_VAR, CONTEXT_new_func_scope, CONTEXT_reset_new_func_scope, CONTEXT_set_top_level_expr, Current_Indentation(), CURRENT_SYMTAB, Decrement_Indentation(), EMPTY_STATUS, FALSE, FOREACH_SYMBOL, Increment_Indentation(), Is_Empty_Token_Buffer(), Is_True, New_Token_Buffer(), NULL, OPR_BLOCK, PU_is_mainpu(), Pu_Table, PUINFO_FUNC_ST, PUinfo_local_decls, PUinfo_local_decls_indent, PUinfo_pragmas, PUINFO_RETURN_TO_PARAM, Set_Current_Indentation(), ST2C_New_Common_Block(), ST_is_split_common, ST_name, ST_pu(), ST_sym_class(), Stab_Is_Common_Block(), Stab_Reset_Referenced_Flag(), STATUS, STATUS_set_block, strcmp(), TRUE, UINT, W2C_Cplus_Initializer, W2C_Object_Name(), W2C_Purple_Emission, WN2C_Append_Purple_Funcinfo(), WN2C_Append_Symtab_Consts(), WN2C_Append_Symtab_Vars(), WN2C_Declare_Return_Parameter(), WN2C_Declare_Return_Variable(), WN2C_new_symtab(), WN2C_Purple_Region_Name, WN2C_Translate_Stmt_Sequence(), WN2C_Used_Return_Value, WN_first(), and WN_operator().
| static STATUS WN2C_bnor | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6060 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), CONTEXT_reset_needs_lvalue, CONTEXT_reset_top_level_expr, EMPTY_STATUS, Is_True, opnd, OPR_BNOR, Stab_Mtype_To_Ty(), WN2C_Translate_Arithmetic_Operand(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
| static STATUS WN2C_call | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5027 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), BOOL, CALLSITE_call, CALLSITE_next, CONTEXT_reset_top_level_expr, CONTEXT_set_given_lvalue_ty, CONTEXT_set_top_level_expr, EMPTY_STATUS, Func_Return_To_Param(), Func_Return_Type(), INT, Is_True, KIND_VOID, New_Token_Buffer(), NULL, OPC_VCALL, OPC_VICALL, OPC_VINTRINSIC_CALL, OPC_VPICCALL, OPR_CALL, OPR_ICALL, OPR_INTRINSIC_CALL, OPR_PARM, OPR_PICCALL, PUinfo_Get_CallSites(), ST2C_use_translate(), ST_pu_type, St_Table, TY_has_prototype, TY_IDX_ZERO, TY_kind, TY_parms, TYLIST_item, TYLIST_next, Tylist_Table, void, WHIRL2C_parenthesize(), WN2C_Callsite_Directives(), WN2C_Function_Call_Lhs(), WN2C_translate(), WN_entry_name, WN_intrinsic(), WN_intrinsic_name(), WN_intrinsic_return_to_param(), WN_intrinsic_return_ty(), WN_kid(), WN_kid0(), WN_kid_count(), WN_opcode(), WN_operator(), and WN_ty().
| static void WN2C_Callsite_Directives | ( | TOKEN_BUFFER | tokens, | |
| const WN * | call_wn, | |||
| const ST * | func_st, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3405 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_srcpos, ST2C_use_translate(), WN2C_Append_Pragma_Newline(), WN2C_Stmt_Newline(), WN_Call_Dont_Inline, and WN_Call_Inline.
Referenced by WN2C_call().
| static STATUS WN2C_comma | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6585 of file wn2c.cxx.
References Append_Token_Special(), CONTEXT_reset_top_level_expr, EMPTY_STATUS, Is_True, OPR_COMMA, WN2C_translate(), WN2C_Translate_Comma_Sequence(), WN_first(), WN_kid0(), WN_kid1(), and WN_operator().
| static STATUS WN2C_comment | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5307 of file wn2c.cxx.
References Append_Token_String(), Concat3_Strings(), EMPTY_STATUS, Index_To_Str(), Is_True, OPR_COMMENT, s, strncmp(), WN_GetComment(), and WN_operator().
| static STATUS WN2C_compgoto | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4174 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), Decrement_Indentation(), EMPTY_STATUS, Host_To_Targ(), Increment_Indentation(), INT32, Is_True, MTYPE_M, OPR_COMPGOTO, OPR_GOTO, STATUS, STATUS_set_block, TCON2C_translate(), TY_mtype, void, WN2C_translate(), WN_compgoto_has_default_case, WN_compgoto_idx, WN_compgoto_num_cases, WN_compgoto_table, WN_first(), WN_kid(), WN_next(), WN_operator(), and WN_Tree_Type().
| static STATUS WN2C_complex | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6012 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_reset_needs_lvalue, EMPTY_STATUS, Is_True, OPR_COMPLEX, ST2C_Declare_Tempvar(), Stab_Lock_Tmpvar(), Stab_Mtype_To_Ty(), Stab_Unlock_Tmpvar(), TY2C_Complex_Imagpart_Name, TY2C_Complex_Realpart_Name, UINT, void, W2CF_Symtab_Nameof_Tempvar(), WN2C_translate(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
| static STATUS WN2C_condbr | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4574 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), Decrement_Indentation(), EMPTY_STATUS, Increment_Indentation(), Is_True, OPR_FALSEBR, OPR_TRUEBR, void, WN2C_append_label_name(), WN2C_translate(), WN_condbr_cond, and WN_operator().
| static STATUS WN2C_const | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6536 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CLASS_CONST, CONTEXT_reset_needs_lvalue, EMPTY_STATUS, Extract_Complex_Imag(), Extract_Complex_Real(), Is_True, OPR_CONST, ST2C_Declare_Tempvar(), ST_sym_class(), Stab_Lock_Tmpvar(), STC_val, TCON2C_translate(), TY_Is_Complex(), UINT, W2CF_Symtab_Nameof_Tempvar(), WN2C_Assign_Complex_Const(), WN_operator(), WN_st(), and WN_Tree_Type().
Definition at line 2519 of file wn2c.cxx.
References BZERO, MTYPE_V, OPCODE_make_op(), OPR_LDA, Stab_Pointer_To(), TY_mtype, WN_load_offset(), WN_set_kid_count(), WN_set_map_id(), WN_set_opcode(), WN_set_ty(), WN_st_idx(), and WN_ty().
Referenced by WN2C_iload(), and WN2C_istore().
| static STATUS WN2C_cvt | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5891 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CONTEXT_reset_needs_lvalue, EMPTY_STATUS, FALSE, Is_True, KIND_POINTER, New_Token_Buffer(), OPR_CVT, Prepend_Token_String(), Stab_Mtype_To_Ty(), TY_kind, void, WHIRL2C_parenthesize(), WN2C_prepend_cast(), WN2C_translate(), WN_kid0(), WN_opc_rtype, WN_operator(), WN_rtype(), and WN_Tree_Type().
Referenced by WN2C_agoto().
| static STATUS WN2C_cvtl | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5924 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CONTEXT_reset_needs_lvalue, FALSE, Is_True, New_Token_Buffer(), OPR_CVTL, STATUS, WHIRL2C_parenthesize(), WN2C_arithmetic_compatible_types, WN2C_prepend_cast(), WN2C_translate(), WN_kid0(), WN_operator(), and WN_Tree_Type().
| static STATUS WN2C_dealloca | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6721 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), INT16, n, STATUS, WN2C_Stmt_Newline(), WN2C_translate(), WN_kid(), WN_kid_count(), and WN_linenum().
| static void WN2C_Declare_Return_Parameter | ( | TOKEN_BUFFER | tokens, | |
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2889 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), PUINFO_RETURN_PARAM, ST2C_decl_translate(), WN2C_Declare_Return_Variable(), and WN2C_Return_Value_Name.
Referenced by WN2C_block().
| static void WN2C_Declare_Return_Variable | ( | TOKEN_BUFFER | tokens | ) | [static] |
Definition at line 2871 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), New_Token_Buffer(), PUINFO_RETURN_TY, TY2C_translate_unqualified(), and WN2C_Return_Value_Name.
Referenced by WN2C_block(), and WN2C_Declare_Return_Parameter().
Definition at line 1280 of file wn2c.cxx.
References Decrement_Indentation(), OPR_BLOCK, and WN_operator().
Referenced by WN2C_do_loop(), WN2C_do_while(), WN2C_if(), and WN2C_while_do().
| static STATUS WN2C_do_loop | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4339 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, Is_True, NULL, Number_as_String(), OPR_DO_LOOP, STATUS, void, W2C_Emit_Cgtag, W2C_Prompf_Emission, WN2C_decr_indentation_for_stmt_body(), WN2C_End_Prompf_Transformed_Loop(), WN2C_incr_indentation_for_stmt_body(), WN2C_Start_Prompf_Transformed_Loop(), WN2C_Stmt_Newline(), WN2C_translate(), WN_do_body, WN_do_loop_info, WN_end, WN_Get_Linenum(), WN_operator(), WN_start, and WN_step.
| static STATUS WN2C_do_while | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4392 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, EMPTY_STATUS, Is_True, OPR_DO_WHILE, void, W2C_Prompf_Emission, WN2C_decr_indentation_for_stmt_body(), WN2C_End_Prompf_Transformed_Loop(), WN2C_incr_indentation_for_stmt_body(), WN2C_Start_Prompf_Transformed_Loop(), WN2C_Stmt_Newline(), WN2C_translate(), WN_Get_Linenum(), WN_operator(), WN_while_body, and WN_while_test.
| static void WN2C_End_Prompf_Transformed_Loop | ( | TOKEN_BUFFER | tokens, | |
| const WN * | loop, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3715 of file wn2c.cxx.
References W2CF_Get_Parent(), WN2C_Is_Loop_Region(), and WN2C_Prompf_Construct_End().
Referenced by WN2C_do_loop(), WN2C_do_while(), and WN2C_while_do().
| static void WN2C_End_Prompf_Transformed_Region | ( | TOKEN_BUFFER | tokens, | |
| const WN * | region, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3743 of file wn2c.cxx.
References WN2C_Is_Loop_Region(), WN2C_Is_Parallel_Region(), and WN2C_Prompf_Construct_End().
Referenced by WN2C_region().
| static STATUS WN2C_eval | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5244 of file wn2c.cxx.
References Is_True, OPR_EVAL, WN2C_translate(), WN_kid0(), and WN_operator().
| static STATUS WN2C_exc_scope_begin | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4687 of file wn2c.cxx.
References Append_Token_String(), CONTEXT_srcpos, Current_Indentation(), EMPTY_STATUS, Set_Current_Indentation(), UINT, and WN2C_Stmt_Newline().
| static STATUS WN2C_exc_scope_end | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4673 of file wn2c.cxx.
References Append_Token_String(), CONTEXT_srcpos, Current_Indentation(), EMPTY_STATUS, Set_Current_Indentation(), UINT, and WN2C_Stmt_Newline().
| static STATUS WN2C_extract_bits | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6745 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), EMPTY_STATUS, Number_as_String(), UINT64, WN2C_Translate_Arithmetic_Operand(), WN_bit_offset(), WN_bit_size(), WN_kid0(), and WN_Tree_Type().
| static STATUS WN2C_func_entry | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3831 of file wn2c.cxx.
References alloca, Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), CONTEXT_set_incomplete_ty2c, CONTEXT_set_new_func_scope, CONTEXT_set_srcpos, CONTEXT_srcpos, Decrement_Indentation(), EMPTY_STATUS, FALSE, Increment_Indentation(), INT, Is_True, NULL, OPR_FUNC_ENTRY, OPR_IDNAME, PUinfo_Get_ReturnSites(), PUinfo_pragmas, ST2C_func_header(), ST2C_use_translate(), St_Table, void, W2C_No_Pragmas, W2C_Prompf_Emission, WN2C_pragma_list_begin(), WN2C_pragma_list_end(), WN2C_Prompf_Construct_End(), WN2C_Prompf_Construct_Start(), WN2C_Stmt_Newline(), WN2C_translate(), WN2C_Used_Return_Value, WN_entry_name, WN_first(), WN_formal, WN_func_body, WN_func_pragmas, WN_Get_Linenum(), WN_next(), WN_num_formals, WN_operator(), WN_region_pragmas, and WN_st().
| static STATUS WN2C_funcall_op | ( | TOKEN_BUFFER | tokens, | |
| OPCODE | opcode, | |||
| WN * | wn0, | |||
| WN * | wn1, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 1708 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), binary_op, BOOL, CONTEXT_reset_needs_lvalue, CONTEXT_set_top_level_expr, EMPTY_STATUS, KIND_VOID, NULL, OPCODE_desc(), OPCODE_rtype(), Stab_Mtype_To_Ty(), TY_kind, WN2C_infix_op(), WN2C_is_pointer_diff(), WN2C_Opc2cname, and WN2C_Translate_Arithmetic_Operand().
Referenced by WN2C_binaryop(), and WN2C_unaryop().
| static void WN2C_Function_Call_Lhs | ( | TOKEN_BUFFER | rhs_tokens, | |
| BOOL | parm_return, | |||
| TY_IDX | return_ty, | |||
| const WN * | first_arg, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2995 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), BOOL, CALLSITE_in_regs, CALLSITE_return_var, CALLSITE_store1, CALLSITE_var_offset, CLASS_PREG, CONTEXT_srcpos, FALSE, Is_True, KIND_STRUCT, last_ret_tmp, MTYPE_V, New_Token_Buffer(), NULL, OPR_ISTORE, OPR_LDID, Prepend_And_Reclaim_Token_List(), Prepend_Token_Special(), PUinfo_Get_ReturnPreg(), PUinfo_Preg_Type(), Reclaim_Token_Buffer(), RETURN_PREG_mtype, RETURN_PREG_num_pregs, RETURN_PREG_offset, ST2C_Declare_Tempvar(), ST2C_Use_Preg(), ST_sym_class(), ST_type, Stab_Lock_Tmpvar(), Stab_Mtype_To_Ty(), Stab_Pointer_To(), Stab_Unlock_Tmpvar(), STATUS, STATUS_is_lvalue, strcmp(), strncpy(), TRUE, TY_Is_Pointer(), TY_Is_Preg_Type(), TY_kind, TY_mtype, TY_name, TY_pointed, TY_size, UINT, var_offset, W2CF_Symtab_Nameof_Tempvar(), WN2C_assignment_compatible_types, WN2C_Load_Return_Reg(), WN2C_lvalue_st(), WN2C_lvalue_wn(), WN2C_MemAccess_Type(), WN2C_prepend_cast(), WN2C_Stmt_Newline(), WN_kid0(), WN_kid1(), WN_opc_dtype, WN_operator(), WN_store_offset(), WN_Tree_Type(), and WN_ty().
Referenced by WN2C_call().
| static void WN2C_Function_Return_Value | ( | TOKEN_BUFFER | tokens, | |
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3239 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_String(), CLASS_PREG, CONTEXT_reset_needs_lvalue, CONTEXT_set_top_level_expr, FALSE, Is_True, New_Token_Buffer(), NULL, OPR_STID, Prepend_Token_Special(), PUinfo_Preg_Type(), PUinfo_return_preg, PUINFO_RETURN_TO_PARAM, PUINFO_RETURN_TY, RETURN_PREG_mtype, RETURN_PREG_num_pregs, RETURN_PREG_offset, RETURNSITE_return_var, RETURNSITE_store1, RETURNSITE_var_offset, ST2C_Use_Preg(), ST_sym_class(), ST_type, Stab_Mtype_To_Ty(), Stab_Pointer_To(), STATUS, STATUS_is_lvalue, TRUE, TY_Is_Preg_Type(), TY_size, var_offset, WN2C_assignment_compatible_types, WN2C_lvalue_st(), WN2C_prepend_cast(), WN2C_Return_Value_Name, WN2C_Store_Return_Reg(), WN2C_translate(), WN2C_Used_Return_Value, WN_kid0(), WN_operator(), and WN_Tree_Type().
Referenced by WN2C_return().
| static STAB_OFFSET WN2C_Gen_Const_Array_Index | ( | TOKEN_BUFFER | expr_tokens, | |
| TY_IDX | ty_idx, | |||
| STAB_OFFSET | cur_offset | |||
| ) | [static] |
Definition at line 2030 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), buf, index(), sprintf(), TY_etype, TY_Is_Array(), and TY_size.
Referenced by WN2C_based_lvalue(), and WN2C_Gen_Field_Access().
| static STAB_OFFSET WN2C_Gen_Field_Access | ( | TOKEN_BUFFER | expr_tokens, | |
| TY_IDX | fld_ty, | |||
| STAB_OFFSET | cur_offset, | |||
| UINT | field_id | |||
| ) | [static] |
Definition at line 2052 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), FLD_list::ar, FLD_name, FLD_ofst, FLD_type, FmtAssert, get_to_field_with_name(), i, FLD_HANDLE::Is_Null(), FLD_list::size, TY_Is_Array(), UINT, WN2C_Gen_Const_Array_Index(), and WN2C_MAX_FLD_LEVEL.
Referenced by WN2C_based_lvalue().
| static TOKEN_BUFFER WN2C_generate_cast | ( | TY_IDX | cast_to, | |
| BOOL | pointer_to_type | |||
| ) | [static] |
Definition at line 1292 of file wn2c.cxx.
References Append_Token_Special(), New_Token_Buffer(), TY2C_translate_unqualified(), TY_Is_Array_Or_Function(), and WHIRL2C_parenthesize().
Referenced by WN2C_append_cast(), and WN2C_prepend_cast().
Definition at line 2799 of file wn2c.cxx.
References KIND_ARRAY, KIND_POINTER, TY_etype, TY_kind, and TY_pointed.
Definition at line 1202 of file wn2c.cxx.
References FLD_get_to_field(), FLD_ofst, and UINT.
Referenced by WN2C_iload(), WN2C_istore(), WN2C_ldid(), and WN2C_stid().
| static STATUS WN2C_goto | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4521 of file wn2c.cxx.
References Append_Token_String(), EMPTY_STATUS, Is_True, OPR_CASEGOTO, OPR_GOTO, OPR_REGION_EXIT, WN2C_append_label_name(), and WN_operator().
| static STATUS WN2C_if | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4464 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, FALSE, Is_True, OPR_BLOCK, OPR_IF, STATUS, void, WN2C_decr_indentation_for_stmt_body(), WN2C_incr_indentation_for_stmt_body(), WN2C_Stmt_Newline(), WN2C_translate(), WN2C_Translate_Stmt_Sequence(), WN_else, WN_else_is_empty, WN_first(), WN_Get_Linenum(), WN_if_test, WN_Is_If_Guard, WN_operator(), and WN_then.
| static STATUS WN2C_ignore | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
| static STATUS WN2C_iload | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5328 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_String(), buf, Current_Indentation(), EMPTY_STATUS, FALSE, Get_Field_Type(), Is_True, Make_Pointer_Type(), New_Token_Buffer(), OPR_ILOAD, OPR_LDID, SCLASS_FORMAL_REF, Set_Current_Indentation(), sprintf(), ST_sclass, TY_Is_Pointer(), TY_is_union, TY_pointed, W2C_Emit_Prefetch, W2C_Only_Mark_Loads, WN2C_arithmetic_compatible_types, WN2C_create_ref_param_lda(), WN2C_get_union_offset(), WN2C_memref_lhs(), WN2C_Prefetch_Map(), WN2C_prepend_cast(), WN_field_id(), WN_kid0(), WN_load_addr_ty(), WN_load_offset(), WN_MAP_Get, WN_MAP_PREFETCH, WN_opc_dtype, WN_operator(), WN_st(), WN_store_offset(), WN_Tree_Type(), and WN_ty().
Referenced by WN2C_agoto(), and WN2C_ldid().
| static STATUS WN2C_iloadx | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5418 of file wn2c.cxx.
References CLASS_PREG, EMPTY_STATUS, FALSE, Is_True, OPR_ILOADX, OPR_LDID, ST_sym_class(), TY_pointed, WN2C_arithmetic_compatible_types, WN2C_Load_From_PregIdx(), WN2C_MemAccess_Type(), WN2C_prepend_cast(), WN_kid0(), WN_kid1(), WN_load_addr_ty(), WN_load_offset(), WN_opc_dtype, WN_operator(), WN_st(), and WN_ty().
| static STATUS WN2C_imagpart | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5980 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_reset_needs_lvalue, EMPTY_STATUS, Is_True, OPR_IMAGPART, TY2C_Complex_Imagpart_Name, WN2C_translate(), WN_kid0(), and WN_operator().
Definition at line 1268 of file wn2c.cxx.
References Increment_Indentation(), OPR_BLOCK, and WN_operator().
Referenced by WN2C_do_loop(), WN2C_do_while(), WN2C_if(), and WN2C_while_do().
| static STATUS WN2C_infix_op | ( | TOKEN_BUFFER | tokens, | |
| OPCODE | opcode, | |||
| TY_IDX | result_ty, | |||
| WN * | wn0, | |||
| WN * | wn1, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 1582 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), binary_op, BOOL, CONTEXT_reset_top_level_expr, CONTEXT_top_level_expr, EMPTY_STATUS, Host_To_Targ(), MTYPE_V, NULL, OPCODE_desc(), OPCODE_operator(), OPR_CONST, OPR_INTCONST, OPR_MPY, OPR_NEG, Stab_Mtype_To_Ty(), STC_val, Targ_WhirlOp(), TCON2C_translate(), TY_Is_Pointer(), WN2C_address_add(), WN2C_is_pointer_diff(), WN2C_Opc2cname, WN2C_Translate_Arithmetic_Operand(), WN_const_val(), WN_kid0(), WN_kid1(), WN_opc_rtype, WN_opcode(), WN_operator(), WN_st(), and WN_Tree_Type().
Referenced by WN2C_binaryop(), WN2C_funcall_op(), and WN2C_unaryop().
Definition at line 6771 of file wn2c.cxx.
References handler(), INT, map, NUMBER_OF_OPC2CNAME_MAPS, NUMBER_OF_OPERATORS, NUMBER_OF_OPR2HANDLER_MAPS, opc, WN2C_Opc2cname, WN2C_Opr_Handler, and WN2C_unsupported().
Referenced by W2C_Init().
Definition at line 6638 of file wn2c.cxx.
References KIND_SCALAR, MTYPE_is_signed, strcmp(), TY_is_logical, TY_kind, TY_mtype, TY_name, and TY_size.
Referenced by WN2C_parm().
| static STATUS WN2C_intconst | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6572 of file wn2c.cxx.
References CONTEXT_reset_needs_lvalue, EMPTY_STATUS, Host_To_Targ(), Is_True, OPR_INTCONST, TCON2C_translate(), WN_const_val(), WN_opc_rtype, and WN_operator().
Referenced by WN2C_agoto().
| static STATUS WN2C_intrinsic_op | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5788 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), CONTEXT_reset_needs_lvalue, CONTEXT_set_top_level_expr, EMPTY_STATUS, FALSE, INT, Is_True, New_Token_Buffer(), OPR_INTRINSIC_OP, Stab_Mtype_To_Ty(), TY_mtype, void, WN2C_arithmetic_compatible_types, WN2C_prepend_cast(), WN2C_translate(), WN_intrinsic(), WN_intrinsic_name(), WN_intrinsic_return_ty(), WN_kid(), WN_kid_count(), WN_opc_rtype, WN_opcode(), and WN_operator().
Definition at line 3625 of file wn2c.cxx.
References BOOL, Ignore_Synchronized_Construct(), NULL, OPR_REGION, WN_first(), WN_operator(), WN_pragma(), WN_PRAGMA_DOACROSS, WN_pragma_nest, WN_PRAGMA_PARALLEL_DO, WN_PRAGMA_PDO_BEGIN, and WN_region_pragmas.
Referenced by WN2C_End_Prompf_Transformed_Loop(), WN2C_End_Prompf_Transformed_Region(), WN2C_Start_Prompf_Transformed_Loop(), and WN2C_Start_Prompf_Transformed_Region().
Definition at line 3648 of file wn2c.cxx.
References BOOL, Ignore_Synchronized_Construct(), NULL, OPR_REGION, WN_first(), WN_operator(), WN_pragma(), WN_PRAGMA_MASTER_BEGIN, WN_PRAGMA_PARALLEL_BEGIN, WN_PRAGMA_PARALLEL_SECTIONS, WN_PRAGMA_PSECTION_BEGIN, WN_PRAGMA_SINGLE_PROCESS_BEGIN, and WN_region_pragmas.
Referenced by WN2C_End_Prompf_Transformed_Region(), and WN2C_Start_Prompf_Transformed_Region().
Definition at line 146 of file wn2c.cxx.
References BOOL, FALSE, OPCODE_operator(), OPR_ASHR, OPR_INTCONST, OPR_SUB, TRUE, TY_Is_Pointer(), TY_pointed, TY_size, WN_const_val(), WN_kid0(), WN_kid1(), WN_operator(), and WN_Tree_Type().
Referenced by WN2C_funcall_op(), and WN2C_infix_op().
Definition at line 1194 of file wn2c.cxx.
References KIND_POINTER, KIND_VOID, TY_kind, and TY_pointed.
Referenced by WN2C_ldid().
| static STATUS WN2C_istore | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4701 of file wn2c.cxx.
References EMPTY_STATUS, Get_Field_Type(), Is_True, lhs_address, Make_Pointer_Type(), New_Token_Buffer(), OPR_ISTORE, OPR_STID, SCLASS_FORMAL_REF, ST_sclass, TY_Is_Pointer(), TY_is_union, TY_pointed, W2C_Emit_Prefetch, WN2C_Append_Assignment(), WN2C_create_ref_param_lda(), WN2C_get_union_offset(), WN2C_memref_lhs(), WN2C_Prefetch_Map(), WN_field_id(), WN_kid0(), WN_kid1(), WN_MAP_Get, WN_MAP_PREFETCH, WN_opc_dtype, WN_operator(), WN_st(), WN_store_offset(), and WN_ty().
Referenced by WN2C_stid().
| static STATUS WN2C_istorex | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4774 of file wn2c.cxx.
References CLASS_PREG, EMPTY_STATUS, Is_True, New_Token_Buffer(), OPR_ISTOREX, OPR_LDID, ST_sym_class(), TY_Is_Pointer(), TY_pointed, WN2C_Append_Assignment(), WN2C_Load_From_PregIdx(), WN2C_MemAccess_Type(), WN_kid(), WN_kid0(), WN_kid1(), WN_load_offset(), WN_opc_dtype, WN_operator(), WN_st(), WN_store_offset(), WN_Tree_Type(), and WN_ty().
| static STATUS WN2C_label | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4660 of file wn2c.cxx.
References Append_Token_Special(), EMPTY_STATUS, Is_True, OPR_LABEL, WN2C_append_label_name(), and WN_operator().
| static STATUS WN2C_lda | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6379 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), CLASS_CONST, CLASS_FUNC, CLASS_PREG, CONTEXT_needs_lvalue, EMPTY_STATUS, Extract_Complex_Imag(), Extract_Complex_Real(), FALSE, Is_True, KIND_ARRAY, MTYPE_I4, MTYPE_STRING, MTYPE_To_TY, MTYPE_U1, New_Token_Buffer(), NULL, OPR_LDA, Prepend_Token_Special(), SCLASS_FORMAL_REF, ST2C_Declare_Tempvar(), ST_name, ST_pu_type, ST_sclass, ST_sym_class(), ST_type, Stab_Lock_Tmpvar(), Stab_Mtype_To_Ty(), Stab_Pointer_To(), STATUS, STATUS_is_lvalue, STATUS_reset_lvalue, STC_val, TCON2C_translate(), TCON_ty, TY_etype, TY_Is_Complex(), TY_Is_Pointer(), TY_Is_Structured(), TY_kind, TY_mtype, TY_pointed, TY_size, UINT, W2CF_Symtab_Nameof_Tempvar(), WN2C_arithmetic_compatible_types, WN2C_Assign_Complex_Const(), WN2C_ldid(), WN2C_lvalue_st(), WN2C_MemAccess_Type(), WN2C_prepend_cast(), WN_field_id(), WN_lda_offset(), WN_operator(), WN_st(), WN_Tree_Type(), and WN_ty().
| static STATUS WN2C_lda_label | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4647 of file wn2c.cxx.
References Append_Token_Special(), EMPTY_STATUS, Is_True, OPR_LDA_LABEL, WN2C_append_label_name(), and WN_operator().
Referenced by WN2C_agoto().
| static STATUS WN2C_ldid | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6200 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), buf, CLASS_PREG, EMPTY_STATUS, Fail_FmtAssertion(), FALSE, First_Float_Preg_Return_Offset, First_Int_Preg_Return_Offset, Is_True, last_ret_tmp, MTYPE_C10, MTYPE_C4, MTYPE_C8, MTYPE_CQ, MTYPE_F10, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_M, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, New_Token_Buffer(), OPR_LDA, OPR_LDID, Prepend_Token_Special(), PUinfo_Preg_Type(), SCLASS_FORMAL_REF, Set_ST_type, sprintf(), ST2C_Declare_Tempvar(), ST_sclass, ST_sym_class(), ST_type, Stab_Lock_Tmpvar(), Stab_Pointer_To(), Stab_Unlock_Tmpvar(), STATUS, STATUS_is_lvalue, TRUE, TY_Is_Pointer(), TY_Is_Structured(), TY_is_union, TY_mtype, Ty_Table, UINT, W2C_Only_Mark_Loads, W2CF_Symtab_Nameof_Tempvar(), WN2C_Append_Preg(), WN2C_arithmetic_compatible_types, WN2C_get_union_offset(), WN2C_iload(), WN2C_is_void_ptr(), WN2C_lvalue_st(), WN2C_prepend_cast(), WN2C_SymAccess_Type(), WN_field_id(), WN_load_offset(), WN_opc_dtype, WN_operator(), WN_st(), WN_Tree_Type(), and WN_ty().
Referenced by WN2C_agoto(), and WN2C_lda().
| static void WN2C_Load_From_PregIdx | ( | TOKEN_BUFFER | tokens, | |
| const ST * | preg1, | |||
| PREG_IDX | preg_idx1, | |||
| const ST * | preg2, | |||
| PREG_IDX | preg_idx2, | |||
| TY_IDX | object_ty, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2576 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), MTYPE_U1, New_Token_Buffer(), Prepend_Token_Special(), ST_type, Stab_Mtype_To_Ty(), Stab_Pointer_To(), TRUE, WN2C_append_addr_plus_expr(), WN2C_Append_Preg(), and WN2C_prepend_cast().
Referenced by WN2C_iloadx(), and WN2C_istorex().
| static void WN2C_Load_Return_Reg | ( | TOKEN_BUFFER | tokens, | |
| TY_IDX | return_ty, | |||
| const char * | var_name, | |||
| STAB_OFFSET | var_offset, | |||
| MTYPE | preg_mtype, | |||
| PREG_IDX | preg_offset, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2955 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), EMPTY_STATUS, New_Token_Buffer(), Prepend_Token_Special(), ST2C_Use_Preg(), Stab_Mtype_To_Ty(), Stab_Pointer_To(), STATUS, STATUS_is_lvalue, TRUE, and WN2C_based_lvalue().
Referenced by WN2C_Function_Call_Lhs().
| static STATUS WN2C_lvalue_st | ( | TOKEN_BUFFER | tokens, | |
| const ST * | st, | |||
| TY_IDX | addr_ty, | |||
| TY_IDX | object_ty, | |||
| STAB_OFFSET | addr_offset, | |||
| CONTEXT | context, | |||
| UINT | field_id = 0 | |||
| ) | [static] |
Definition at line 2312 of file wn2c.cxx.
References CLASS_CONST, CLASS_FUNC, CLASS_PREG, EMPTY_STATUS, Is_True, ST2C_use_translate(), ST_base, ST_full, ST_is_split_common, ST_ofst, ST_pu_type, ST_sym_class(), ST_type, Stab_Full_Split_Offset(), Stab_Is_Based_At_Common_Or_Equivalence(), Stab_Pointer_To(), STATUS, STC_val, TCON2C_translate(), TRUE, and WN2C_based_lvalue().
Referenced by WN2C_Function_Call_Lhs(), WN2C_Function_Return_Value(), WN2C_lda(), WN2C_ldid(), and WN2C_stid_lhs().
| static STATUS WN2C_lvalue_wn | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| TY_IDX | addr_ty, | |||
| TY_IDX | object_ty, | |||
| STAB_OFFSET | addr_offset, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2407 of file wn2c.cxx.
References BOOL, CONTEXT_reset_top_level_expr, CONTEXT_set_array_basetype, CONTEXT_set_given_base_ty, CONTEXT_set_given_lvalue_ty, CONTEXT_set_lvalue_type, CONTEXT_set_needs_lvalue, FALSE, Get_Field_Type(), Get_Inner_Array_Type(), KIND_POINTER, KIND_VOID, NULL, OPR_ADD, OPR_ARRAY, OPR_ILOAD, OPR_LDA, OPR_LDID, ST_type, Stab_Pointer_To(), STATUS, STATUS_is_lvalue, STATUS_reset_lvalue, TRUE, TY_Is_Array(), TY_Is_Pointer(), TY_kind, TY_pointed, WN2C_assignment_compatible_types, WN2C_based_lvalue(), WN2C_prepend_cast(), WN2C_ptr_array_wn(), WN2C_translate(), WN_field_id(), WN_Get_PtrAdd_Intconst(), WN_kid0(), WN_kid1(), WN_operator(), WN_st(), WN_Tree_Type(), and WN_ty().
Referenced by WN2C_address_add(), WN2C_Function_Call_Lhs(), WN2C_memref_lhs(), WN2C_mload(), and WN2C_mstore().
| static STATUS WN2C_madd | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6086 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), CONTEXT_reset_needs_lvalue, CONTEXT_reset_top_level_expr, EMPTY_STATUS, Is_True, opnd, OPR_MADD, Stab_Mtype_To_Ty(), WN2C_Translate_Arithmetic_Operand(), WN_kid(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
| static TY_IDX WN2C_MemAccess_Type | ( | TY_IDX | base_ty, | |
| TY_IDX | load_ty, | |||
| MTYPE | load_mtype, | |||
| STAB_OFFSET | offset | |||
| ) | [static] |
Definition at line 1765 of file wn2c.cxx.
References FLD_type, TY2C_Fld_Info::found_fld, FLD_HANDLE::Is_Null(), Reclaim_Token_Buffer(), TY2C_Fld_Info::select_tokens, Stab_Mtype_To_Ty(), TY2C_get_field_info(), TY_Is_Array(), TY_Is_Structured(), TY_size, and WN2C_compatible_lvalues.
Referenced by WN2C_Function_Call_Lhs(), WN2C_iloadx(), WN2C_istorex(), WN2C_lda(), WN2C_memref_lhs(), WN2C_mload(), and WN2C_mstore().
| void WN2C_memref_lhs | ( | TOKEN_BUFFER | tokens, | |
| TY_IDX * | memref_typ, | |||
| const WN * | lhs, | |||
| STAB_OFFSET | memref_ofst, | |||
| TY_IDX | memref_addr_ty, | |||
| TY_IDX | memref_object_ty, | |||
| MTYPE | dtype, | |||
| CONTEXT | context | |||
| ) |
Definition at line 6989 of file wn2c.cxx.
References Prepend_Token_Special(), STATUS, STATUS_is_lvalue, TY_Is_Pointer(), TY_mtype, TY_pointed, WN2C_lvalue_wn(), WN2C_MemAccess_Type(), and WN_Tree_Type().
Referenced by W2C_Translate_Istore_Lhs(), WN2C_iload(), WN2C_istore(), and WN2C_Value_Reference().
| static STATUS WN2C_mload | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5459 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_String(), buf, EMPTY_STATUS, Get_Field_Type(), Is_True, MTYPE_M, New_Token_Buffer(), OPR_INTCONST, OPR_MLOAD, Prepend_Token_Special(), sprintf(), STATUS, STATUS_is_lvalue, TY_Is_Pointer(), TY_pointed, W2C_Only_Mark_Loads, WN2C_lvalue_wn(), WN2C_MemAccess_Type(), WN_field_id(), WN_kid0(), WN_kid1(), WN_load_offset(), WN_operator(), WN_Tree_Type(), and WN_ty().
| static STATUS WN2C_mstore | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4821 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), Concat2_Strings(), Decrement_Indentation(), EMPTY_STATUS, Get_Field_Type(), Host_To_Targ(), Increment_Indentation(), INT32, Is_True, MTYPE_I8, MTYPE_M, New_Token_Buffer(), OPR_INTCONST, OPR_MLOAD, OPR_MSTORE, Prepend_Token_Special(), rhs_size, rhs_ty, ST2C_Declare_Tempvar(), Stab_Lock_Tmpvar(), Stab_Pointer_To(), Stab_Unlock_Tmpvar(), STATUS, STATUS_is_lvalue, TCON2C_translate(), TRUE, TY_Is_Pointer(), TY_Is_Structured(), TY_pointed, TY_size, UINT, void, W2CF_Symtab_Nameof_Tempvar(), WN2C_Append_Assignment(), WN2C_append_cast(), WN2C_lvalue_wn(), WN2C_MemAccess_Type(), WN2C_translate(), WN_field_id(), WN_kid(), WN_kid0(), WN_kid1(), WN_load_offset(), WN_operator(), WN_store_offset(), WN_Tree_Type(), and WN_ty().
| static STATUS WN2C_msub | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6114 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), CONTEXT_reset_needs_lvalue, CONTEXT_reset_top_level_expr, EMPTY_STATUS, Is_True, opnd, OPR_SUB, Stab_Mtype_To_Ty(), WN2C_Translate_Arithmetic_Operand(), WN_kid(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
Definition at line 6814 of file wn2c.cxx.
References BOOL, and CURRENT_SYMTAB.
Referenced by W2C_Pop_PU(), WN2C_block(), and WN2C_translate_file_scope_defs().
| static STATUS WN2C_nmadd | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6142 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), CONTEXT_reset_needs_lvalue, CONTEXT_reset_top_level_expr, EMPTY_STATUS, Is_True, opnd, OPR_NMADD, Stab_Mtype_To_Ty(), WN2C_Translate_Arithmetic_Operand(), WN_kid(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
| static STATUS WN2C_nmsub | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6171 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), CONTEXT_reset_needs_lvalue, CONTEXT_reset_top_level_expr, EMPTY_STATUS, Is_True, opnd, OPR_NMSUB, Stab_Mtype_To_Ty(), WN2C_Translate_Arithmetic_Operand(), WN_kid(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
| static void WN2C_Normalize_Idx_To_Onedim | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2680 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_top_level_expr, INT32, sprintf(), void, W2C_Emit_Adims, WN2C_translate(), WN_array_dim, WN_array_index, and WN_num_dim.
Referenced by WN2C_array().
| static STATUS WN2C_paren | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5995 of file wn2c.cxx.
References Append_Token_Special(), CONTEXT_set_top_level_expr, Is_True, OPR_PAREN, STATUS, WN2C_translate(), WN_kid0(), and WN_operator().
| static STATUS WN2C_parm | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6661 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CONTEXT_given_lvalue_ty, CONTEXT_reset_given_lvalue_ty, CONTEXT_reset_top_level_expr, EMPTY_STATUS, FALSE, Is_True, New_Token_Buffer(), OPR_PARM, STATUS, TY_IDX_ZERO, TY_Is_Pointer(), TY_is_volatile, TY_pointed, WN2C_assignment_compatible_types, WN2C_int_downcast(), WN2C_prepend_cast(), WN2C_translate(), WN_kid0(), WN_operator(), WN_Tree_Type(), and WN_ty().
| static STATUS WN2C_prefetch | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5255 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), Concat2_Strings(), Concat3_Strings(), Current_Indentation(), EMPTY_STATUS, INT, Is_True, Number_as_String(), OPR_PREFETCH, OPR_PREFETCHX, PF_GET_CONFIDENCE, PF_GET_READ, PF_GET_STRIDE_1L, PF_GET_STRIDE_2L, Ptr_as_String(), Set_Current_Indentation(), void, WN2C_translate(), WN_kid0(), WN_kid1(), WN_offset(), WN_operator(), and WN_prefetch_flag().
| static void WN2C_Prefetch_Map | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3576 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_String(), Concat2_Strings(), CONTEXT_srcpos, pf_pointer::lrnum_1L, pf_pointer::lrnum_2L, Number_as_String(), Ptr_as_String(), WN2C_Stmt_Newline(), WN_MAP_Get, WN_MAP_PREFETCH, pf_pointer::wn_pref_1L, and pf_pointer::wn_pref_2L.
Referenced by WN2C_iload(), and WN2C_istore().
| static void WN2C_prepend_cast | ( | TOKEN_BUFFER | tokens, | |
| TY_IDX | cast_to, | |||
| BOOL | pointer_to_type | |||
| ) | [static] |
Definition at line 1317 of file wn2c.cxx.
References Prepend_And_Reclaim_Token_List(), and WN2C_generate_cast().
Referenced by WN2C_Append_Assignment(), WN2C_Append_Preg(), WN2C_array(), WN2C_based_lvalue(), WN2C_cvt(), WN2C_cvtl(), WN2C_Function_Call_Lhs(), WN2C_Function_Return_Value(), WN2C_iload(), WN2C_iloadx(), WN2C_intrinsic_op(), WN2C_lda(), WN2C_ldid(), WN2C_Load_From_PregIdx(), WN2C_lvalue_wn(), WN2C_parm(), WN2C_ptr_array_wn(), WN2C_tas(), and WN2C_Translate_Arithmetic_Operand().
| static void WN2C_Prompf_Construct_End | ( | TOKEN_BUFFER | tokens, | |
| const WN * | construct | |||
| ) | [static] |
Definition at line 3685 of file wn2c.cxx.
References Append_Token_String(), INT32, Number_as_String(), W2C_Construct_Map, WN2C_Append_Prompf_Flag_Newline(), and WN_MAP32_Get.
Referenced by WN2C_End_Prompf_Transformed_Loop(), WN2C_End_Prompf_Transformed_Region(), and WN2C_func_entry().
| static void WN2C_Prompf_Construct_Start | ( | TOKEN_BUFFER | tokens, | |
| const WN * | construct | |||
| ) | [static] |
Definition at line 3669 of file wn2c.cxx.
References Append_Token_String(), INT32, Number_as_String(), W2C_Construct_Map, WN2C_Append_Prompf_Flag_Newline(), and WN_MAP32_Get.
Referenced by WN2C_func_entry(), WN2C_Start_Prompf_Transformed_Loop(), and WN2C_Start_Prompf_Transformed_Region().
| static STATUS WN2C_ptr_array_wn | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| TY_IDX | object_ty, | |||
| STAB_OFFSET | addr_offset, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2377 of file wn2c.cxx.
References EMPTY_STATUS, FmtAssert, OPR_LDID, ST2C_use_translate(), STATUS, TRUE, TY_size, WHIRL2C_parenthesize(), WN2C_append_addr_plus_const(), WN2C_prepend_cast(), WN_operator(), and WN_st().
Referenced by WN2C_lvalue_wn().
| static STATUS WN2C_rcomma | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 6603 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_reset_top_level_expr, EMPTY_STATUS, Is_True, OPR_RCOMMA, ST2C_Declare_Tempvar(), Stab_Lock_Tmpvar(), UINT, W2CF_Symtab_Nameof_Tempvar(), WN2C_translate(), WN2C_Translate_Comma_Sequence(), WN_first(), WN_kid0(), WN_kid1(), WN_operator(), and WN_Tree_Type().
| static STATUS WN2C_realpart | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5965 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_reset_needs_lvalue, EMPTY_STATUS, Is_True, OPR_REALPART, TY2C_Complex_Realpart_Name, WN2C_translate(), WN_kid0(), and WN_operator().
| static STATUS WN2C_region | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4092 of file wn2c.cxx.
References Append_Token_String(), BOOL, CONTEXT_srcpos, EMPTY_STATUS, Is_True, NULL, OPR_BLOCK, OPR_REGION, RID_map, RID_type, RID_TYPE_pragma, TRUE, W2C_Emit_All_Regions, W2C_No_Pragmas, W2C_Prompf_Emission, WN2C_Append_Pragma_Newline(), WN2C_End_Prompf_Transformed_Region(), WN2C_pragma_list_begin(), WN2C_pragma_list_end(), WN2C_Start_Prompf_Transformed_Region(), WN2C_Translate_Stmt_Sequence(), WN_first(), WN_Get_Linenum(), WN_MAP_Get, WN_operator(), WN_region_body, and WN_region_pragmas.
| static STATUS WN2C_return | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4607 of file wn2c.cxx.
References Append_Token_String(), EMPTY_STATUS, Is_True, KIND_VOID, MTYPE_V, OPR_RETURN, PUinfo_return_preg, PUINFO_RETURN_TY, RETURN_PREG_mtype, RETURNSITE_next, RETURNSITE_return, TY_kind, WN2C_Function_Return_Value(), and WN_operator().
| static STATUS WN2C_return_val | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4634 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), buf, EMPTY_STATUS, Is_True, OPR_RETURN_VAL, void, WN2C_translate(), WN_kid0(), and WN_operator().
| static STATUS WN2C_select | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5867 of file wn2c.cxx.
References Append_Token_Special(), EMPTY_STATUS, Is_True, OPR_CSELECT, OPR_SELECT, void, WN2C_translate(), WN_kid(), WN_kid0(), WN_kid1(), and WN_operator().
Definition at line 190 of file wn2c.cxx.
References CALLSITE_store1, CALLSITE_store2, Index_To_Str(), NULL, OPR_COMMENT, OPR_PRAGMA, OPR_PREFETCH, OPR_PREFETCHX, OPR_XPRAGMA, RETURNSITE_store1, RETURNSITE_store2, strcmp(), W2C_Emit_Prefetch, W2C_No_Pragmas, WN2C_Skip_Pragma_Stmt(), WN_GetComment(), WN_operator(), WN_pragma(), and WN_PRAGMA_PREAMBLE_END.
Referenced by WN2C_Translate_Comma_Sequence(), and WN2C_Translate_Stmt_Sequence().
| static void WN2C_Start_Prompf_Transformed_Loop | ( | TOKEN_BUFFER | tokens, | |
| const WN * | loop, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3701 of file wn2c.cxx.
References W2CF_Get_Parent(), WN2C_Is_Loop_Region(), and WN2C_Prompf_Construct_Start().
Referenced by WN2C_do_loop(), WN2C_do_while(), and WN2C_while_do().
| static void WN2C_Start_Prompf_Transformed_Region | ( | TOKEN_BUFFER | tokens, | |
| const WN * | region, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3729 of file wn2c.cxx.
References WN2C_Is_Loop_Region(), WN2C_Is_Parallel_Region(), and WN2C_Prompf_Construct_Start().
Referenced by WN2C_region().
| static STATUS WN2C_stid | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4971 of file wn2c.cxx.
References CLASS_VAR, EMPTY_STATUS, Get_Field_Type(), Is_True, New_Token_Buffer(), OPR_STID, SCLASS_FORMAL_REF, ST_is_not_used, ST_sclass, ST_sym_class(), TY_is_union, void, WN2C_Append_Assignment(), WN2C_get_union_offset(), WN2C_istore(), WN2C_stid_lhs(), WN2C_translate(), WN_field_id(), WN_kid0(), WN_opc_dtype, WN_operator(), WN_st(), WN_store_offset(), and WN_ty().
| void WN2C_stid_lhs | ( | TOKEN_BUFFER | tokens, | |
| TY_IDX * | stored_typ, | |||
| const ST * | lhs_st, | |||
| STAB_OFFSET | stid_ofst, | |||
| TY_IDX | stid_ty, | |||
| MTYPE | dtype, | |||
| CONTEXT | context, | |||
| UINT | field_id | |||
| ) |
Definition at line 7039 of file wn2c.cxx.
References CLASS_PREG, Prepend_Token_Special(), PUinfo_Preg_Type(), ST_sym_class(), ST_type, STATUS, STATUS_is_lvalue, WN2C_Append_Preg(), WN2C_lvalue_st(), and WN2C_SymAccess_Type().
Referenced by Append_A_Clause_Symbol(), Append_Nest_Clauses(), W2C_Translate_Stid_Lhs(), and WN2C_stid().
| static void WN2C_Stmt_Newline | ( | TOKEN_BUFFER | tokens, | |
| SRCPOS | srcpos | |||
| ) | [static] |
Definition at line 1237 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Srcpos_Directive(), Append_Srcpos_Map(), FALSE, IR_Dwarf_Gen_File_Table(), last_source_line, NULL, W2C_Emit_Linedirs, W2C_File, and W2C_LOC_FILE.
Referenced by Append_Cplus_Initialization(), WN2C_Append_Assignment(), WN2C_Append_Pragma_Newline(), WN2C_Callsite_Directives(), WN2C_dealloca(), WN2C_do_loop(), WN2C_do_while(), WN2C_exc_scope_begin(), WN2C_exc_scope_end(), WN2C_func_entry(), WN2C_Function_Call_Lhs(), WN2C_if(), WN2C_pragma_list_end(), WN2C_Prefetch_Map(), WN2C_process_pragma(), WN2C_Store_Return_Reg(), WN2C_translate_purple_main(), WN2C_Translate_Stmt_Sequence(), and WN2C_while_do().
| static void WN2C_Store_Return_Reg | ( | TOKEN_BUFFER | tokens, | |
| const char * | var_name, | |||
| STAB_OFFSET | var_offset, | |||
| MTYPE | preg_mtype, | |||
| PREG_IDX | preg_offset, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 2915 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), CONTEXT_srcpos, EMPTY_STATUS, New_Token_Buffer(), Prepend_Token_Special(), PUINFO_RETURN_TY, ST2C_Use_Preg(), Stab_Mtype_To_Ty(), Stab_Pointer_To(), STATUS, STATUS_is_lvalue, TRUE, WN2C_based_lvalue(), and WN2C_Stmt_Newline().
Referenced by WN2C_Function_Return_Value().
| static STATUS WN2C_switch | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4254 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), Decrement_Indentation(), EMPTY_STATUS, Host_To_Targ(), Increment_Indentation(), Is_True, NULL, OPR_CASEGOTO, OPR_GOTO, OPR_SWITCH, STATUS, STATUS_set_block, TCON2C_translate(), TY_mtype, void, WN2C_translate(), WN_compgoto_idx, WN_const_val(), WN_first(), WN_next(), WN_operator(), WN_switch_default, WN_switch_has_default_case, WN_switch_table, WN_switch_test, and WN_Tree_Type().
| static void WN2C_SymAccess_Type | ( | TY_IDX * | base_addr_ty, | |
| TY_IDX * | object_ty, | |||
| TY_IDX | base_ty, | |||
| TY_IDX | load_ty, | |||
| MTYPE | load_mtype, | |||
| STAB_OFFSET | offset | |||
| ) | [static] |
Definition at line 1829 of file wn2c.cxx.
References FLD_type, TY2C_Fld_Info::found_fld, FLD_HANDLE::Is_Null(), Reclaim_Token_Buffer(), TY2C_Fld_Info::select_tokens, Stab_Mtype_To_Ty(), Stab_Pointer_To(), TY2C_get_field_info(), TY_AR_etype, TY_Is_Array(), TY_Is_Structured(), TY_is_volatile, TY_size, and WN2C_compatible_lvalues.
Referenced by WN2C_ldid(), and WN2C_stid_lhs().
| static STATUS WN2C_tas | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 5836 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CONTEXT_reset_needs_lvalue, FALSE, Is_True, New_Token_Buffer(), OPR_TAS, STATUS, TY_is_logical, WHIRL2C_parenthesize(), WN2C_compatible_qualified_types, WN2C_prepend_cast(), WN2C_translate(), WN_kid0(), WN_operator(), WN_Tree_Type(), and WN_ty().
| STATUS WN2C_translate | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) |
Definition at line 6831 of file wn2c.cxx.
References OPR_LOC, WN2C_Opr_Handler, and WN_operator().
Referenced by Append_Distribution(), W2C_Outfile_Translate_Pu(), W2C_Translate_Wn(), W2C_Translate_Wn_Str(), WN2C_alloca(), WN2C_Append_Assignment(), WN2C_array(), WN2C_call(), WN2C_comma(), WN2C_compgoto(), WN2C_complex(), WN2C_condbr(), WN2C_cvt(), WN2C_cvtl(), WN2C_dealloca(), WN2C_do_loop(), WN2C_do_while(), WN2C_eval(), WN2C_func_entry(), WN2C_Function_Return_Value(), WN2C_if(), WN2C_imagpart(), WN2C_intrinsic_op(), WN2C_lvalue_wn(), WN2C_mstore(), WN2C_Normalize_Idx_To_Onedim(), WN2C_paren(), WN2C_parm(), WN2C_prefetch(), WN2C_rcomma(), WN2C_realpart(), WN2C_return_val(), WN2C_select(), WN2C_stid(), WN2C_switch(), WN2C_tas(), WN2C_Translate_Arithmetic_Operand(), WN2C_Translate_Comma_Sequence(), WN2C_Translate_Stmt_Sequence(), WN2C_Value_Reference(), and WN2C_while_do().
| static TOKEN_BUFFER WN2C_Translate_Arithmetic_Operand | ( | const WN * | wn, | |
| TY_IDX | result_ty, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 1365 of file wn2c.cxx.
References CONTEXT_ptr_arith, CONTEXT_set_top_level_expr, FALSE, KIND_SCALAR, New_Token_Buffer(), OPR_LDA, TY_kind, void, WHIRL2C_parenthesize(), WN2C_arithmetic_compatible_types, WN2C_prepend_cast(), WN2C_translate(), WN_operator(), WN_Tree_Type(), and WN_ty().
Referenced by WN2C_address_add(), WN2C_bnor(), WN2C_extract_bits(), WN2C_funcall_op(), WN2C_infix_op(), WN2C_madd(), WN2C_msub(), WN2C_nmadd(), and WN2C_nmsub().
| static void WN2C_Translate_Comma_Sequence | ( | TOKEN_BUFFER | tokens, | |
| const WN * | first, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3507 of file wn2c.cxx.
References Append_Token_Special(), CONTEXT_set_srcpos, NULL, WN2C_Skip_Stmt(), WN2C_translate(), WN_Get_Linenum(), and WN_next().
Referenced by WN2C_comma(), and WN2C_rcomma().
Definition at line 6857 of file wn2c.cxx.
References CURRENT_SYMTAB, EMPTY_STATUS, GLOBAL_SYMTAB, NULL, TRUE, W2C_DOTH_FILE, W2C_File, WN2C_Append_Symtab_Consts(), WN2C_Append_Symtab_Vars(), WN2C_new_symtab(), and Write_String().
Referenced by W2C_Outfile_Fini(), and W2C_Translate_Global_Defs().
| STATUS WN2C_translate_purple_main | ( | TOKEN_BUFFER | tokens, | |
| const WN * | pu, | |||
| const char * | region_name, | |||
| CONTEXT | context | |||
| ) |
Definition at line 6886 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, Decrement_Indentation(), EMPTY_STATUS, Increment_Indentation(), INT, Is_True, KIND_VOID, New_Token_Buffer(), OPR_FUNC_ENTRY, PUINFO_RETURN_TO_PARAM, PUINFO_RETURN_TY, ST2C_decl_translate(), TY2C_translate_unqualified(), TY_kind, W2CF_Symtab_Nameof_St(), WN2C_Append_Purple_Funcinfo(), WN2C_Stmt_Newline(), WN_formal, WN_Get_Linenum(), WN_num_formals, WN_operator(), and WN_st().
Referenced by W2C_Translate_Purple_Main().
| static void WN2C_Translate_Stmt_Sequence | ( | TOKEN_BUFFER | tokens, | |
| const WN * | first, | |||
| BOOL | first_on_newline, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3433 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, INT32, NULL, Number_as_String(), OPR_ASSERT, OPR_BACKWARD_BARRIER, OPR_CALL, OPR_COMMENT, OPR_DO_LOOP, OPR_DO_WHILE, OPR_FORWARD_BARRIER, OPR_PICCALL, OPR_PRAGMA, OPR_REGION, OPR_TRAP, OPR_WHILE_DO, OPR_XPRAGMA, STATUS, STATUS_is_block, W2C_Emit_Frequency, W2C_Frequency_Map, WN2C_Skip_Stmt(), WN2C_Stmt_Newline(), WN2C_translate(), WN_Get_Linenum(), WN_MAP32_Get, WN_MAP_UNDEFINED, WN_next(), and WN_operator().
Referenced by WN2C_block(), WN2C_if(), and WN2C_region().
Definition at line 6847 of file wn2c.cxx.
References NULL, W2C_DOTH_FILE, W2C_File, WN2C_Append_Symtab_Types(), and Write_String().
Referenced by W2C_Outfile_Init(), and W2C_Translate_Global_Types().
| static STATUS WN2C_unaryop | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3809 of file wn2c.cxx.
References EMPTY_STATUS, FALSE, Is_True, NULL, WN2C_funcall_op(), WN2C_infix_op(), WN2C_IS_FUNCALL_OP, WN2C_IS_INFIX_OP, WN_kid0(), WN_kid_count(), WN_opc_name, WN_opcode(), and WN_Tree_Type().
| static STATUS WN2C_unsupported | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 3767 of file wn2c.cxx.
References Append_Token_String(), Concat3_Strings(), EMPTY_STATUS, fprintf(), WN_opc_name, and WN_operator().
Referenced by WN2C_initialize().
| static STATUS WN2C_while_do | ( | TOKEN_BUFFER | tokens, | |
| const WN * | wn, | |||
| CONTEXT | context | |||
| ) | [static] |
Definition at line 4429 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, Is_True, OPR_WHILE_DO, STATUS, void, W2C_Prompf_Emission, WN2C_decr_indentation_for_stmt_body(), WN2C_End_Prompf_Transformed_Loop(), WN2C_incr_indentation_for_stmt_body(), WN2C_Start_Prompf_Transformed_Loop(), WN2C_Stmt_Newline(), WN2C_translate(), WN_Get_Linenum(), WN_operator(), WN_while_body, and WN_while_test.
| int debug_requested |
char last_ret_tmp[64] [static] |
SRCPOS last_source_line [static] |
Definition at line 1209 of file wn2c.cxx.
Referenced by translator_warning(), and WN2C_Stmt_Newline().
const RETURNSITE* WN2C_Next_ReturnSite = NULL [static] |
const char* WN2C_Opc2cname[NUMBER_OF_OPCODES] [static] |
Definition at line 449 of file wn2c.cxx.
Referenced by WN2C_funcall_op(), WN2C_infix_op(), and WN2C_initialize().
const OPC2CNAME_MAP WN2C_Opc2cname_Map[] [static] |
WN2C_HANDLER_FUNC WN2C_Opr_Handler[NUMBER_OF_OPERATORS] [static] |
const OPR2HANDLER WN2C_Opr_Handler_Map[] [static] |
const CALLSITE* WN2C_Prev_CallSite = NULL [static] |
const char WN2C_Purple_Region_Name[] = "prp___region" [static] |
Definition at line 173 of file wn2c.cxx.
Referenced by WN2C_Append_Purple_Funcinfo(), and WN2C_block().
const char WN2C_Return_Value_Name[] = "_RetVal" [static] |
Definition at line 174 of file wn2c.cxx.
Referenced by WN2C_Declare_Return_Parameter(), WN2C_Declare_Return_Variable(), and WN2C_Function_Return_Value().
BOOL WN2C_Used_Return_Value = FALSE [static] |
Definition at line 175 of file wn2c.cxx.
Referenced by WN2C_block(), WN2C_func_entry(), and WN2C_Function_Return_Value().
1.5.6