Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#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 "unparse_target.h"
#include <set>
Go to the source code of this file.
#define MTYPE_PREDEF MTYPE_F16 |
#define NUMBER_OF_OPC2CNAME_MAPS sizeof(WN2C_Opc2cname_Map) / sizeof(OPC2CNAME_MAP) |
Definition at line 452 of file wn2c.cxx.
Referenced by WN2C_initialize().
#define NUMBER_OF_OPCODES (OPCODE_LAST+1) |
#define NUMBER_OF_OPERATORS (OPERATOR_LAST + 1) |
Definition at line 301 of file wn2c.cxx.
Referenced by WN2C_initialize().
#define NUMBER_OF_OPR2HANDLER_MAPS (sizeof(WN2C_Opr_Handler_Map) / sizeof(OPR2HANDLER)) |
Definition at line 310 of file wn2c.cxx.
Referenced by WN2C_initialize().
#define WN2C_arithmetic_compatible_types | ( | t1, | |
t2 | |||
) |
Stab_Identical_Types(t1, t2, \ FALSE, /*check_quals*/ \ TRUE, /*check_scalars*/ \ FALSE) /*ptrs_as_scalars*/
Definition at line 107 of file wn2c.cxx.
Referenced by WN2C_Append_Preg(), WN2C_cvtl(), WN2C_iload(), WN2C_iloadx(), WN2C_intrinsic_op(), WN2C_lda(), WN2C_ldid(), WN2C_tas(), and WN2C_Translate_Arithmetic_Operand().
#define WN2C_array_lvalue_as_ptr | ( | ptr_to_array, | |
ptr | |||
) |
(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 119 of file wn2c.cxx.
Referenced by WN2C_based_lvalue().
#define WN2C_assignment_compatible_types | ( | lhs_ty, | |
rhs_ty | |||
) |
Stab_Assignment_Compatible_Types(lhs_ty, rhs_ty, \ FALSE, /*check_quals*/ \ FALSE, /*check_scalars*/ \ FALSE) /*ptrs_as_scalars*/
Definition at line 95 of file wn2c.cxx.
Referenced by WN2C_Append_Assignment(), WN2C_based_lvalue(), WN2C_Function_Call_Lhs(), WN2C_Function_Return_Value(), and WN2C_parm().
#define WN2C_compatible_lvalues | ( | lhs_ty, | |
rhs_ty | |||
) |
Stab_Assignment_Compatible_Types(lhs_ty, rhs_ty, \ FALSE, /*check_quals*/ \ TRUE, /*check_scalars*/ \ FALSE) /*ptrs_as_scalars*/
Definition at line 101 of file wn2c.cxx.
Referenced by WN2C_based_lvalue(), WN2C_MemAccess_Type(), and WN2C_SymAccess_Type().
#define WN2C_compatible_qualified_types | ( | t1, | |
t2 | |||
) |
#define WN2C_IS_FUNCALL_OP | ( | opc | ) | ((WN2C_Opc2cname[opc]!=NULL)? (WN2C_Opc2cname[opc][0]=='_') : FALSE) |
Definition at line 432 of file wn2c.cxx.
Referenced by WN2C_binaryop(), and WN2C_unaryop().
#define WN2C_IS_INFIX_OP | ( | opc | ) | ((WN2C_Opc2cname[opc]!=NULL)? (WN2C_Opc2cname[opc][0]!='_') : FALSE) |
Definition at line 429 of file wn2c.cxx.
Referenced by WN2C_binaryop(), and WN2C_unaryop().
#define WN_pragma_nest | ( | wn | ) | WN_pragma_arg1(wn) |
Definition at line 86 of file wn2c.cxx.
Referenced by WN2C_Is_Loop_Region().
typedef struct Opc2Cname_Map OPC2CNAME_MAP |
typedef struct Opr2handler OPR2HANDLER |
typedef struct SCALAR_C_NAME SCALAR_C_NAME |
typedef STATUS(* WN2C_HANDLER_FUNC)(TOKEN_BUFFER, const WN *, CONTEXT) |
static void Append_Cplus_Initialization | ( | TOKEN_BUFFER | tokens, |
CONTEXT | context | ||
) | [static] |
Definition at line 3162 of file wn2c.cxx.
References Append_Token_String(), CONTEXT_srcpos, and WN2C_Stmt_Newline().
Referenced by WN2C_block().
static void init_map | ( | ) | [static] |
Definition at line 2294 of file wn2c.cxx.
References init, and upcr_internal.
Referenced by WN2C_Append_Symtab_Vars().
Definition at line 2290 of file wn2c.cxx.
References upcr_internal.
Referenced by WN2C_Append_Symtab_Vars().
static STATUS WN2C_address_add | ( | TOKEN_BUFFER | tokens, |
OPCODE | opcode, | ||
TY_IDX | expr_ty, | ||
WN * | wn0, | ||
WN * | wn1, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 1063 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), CONTEXT_given_lvalue_ty, CONTEXT_lvalue_type, CONTEXT_reset_lvalue_type, CONTEXT_reset_needs_lvalue, CONTEXT_reset_top_level_expr, CONTEXT_set_lvalue_type, CONTEXT_top_level_expr, EMPTY_STATUS, FALSE, Is_True, MTYPE_U1, MTYPE_V, 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(), 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_alloca | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 6039 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), WN2C_translate(), and WN_kid0().
static STATUS WN2C_altentry | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 4156 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 1592 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().
static void WN2C_append_addr_plus_expr | ( | TOKEN_BUFFER | tokens, |
INT64 | element_size, | ||
TOKEN_BUFFER * | byte_offset | ||
) | [static] |
Definition at line 1621 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_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 2070 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), CONTEXT_srcpos, FALSE, Get_Field_Type(), KIND_STRUCT, New_Token_Buffer(), OPR_ILOAD, OPR_LDID, Prepend_Token_Special(), ST2C_Declare_Tempvar(), Stab_Lock_Tmpvar(), Stab_Unlock_Tmpvar(), TRUE, TY_Is_Structured(), TY_kind(), W2CF_Symtab_Nameof_Tempvar(), WHIRL2C_parenthesize(), WN2C_assignment_compatible_types, WN2C_prepend_cast(), WN2C_Stmt_Newline(), WN2C_translate(), WN_field_id(), WN_operator(), 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 1003 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 2178 of file wn2c.cxx.
References Append_Token_String(), WHIRL2C_number_as_c_name, and WN_label_number().
Referenced by WN2C_condbr(), WN2C_goto(), and WN2C_label().
static void WN2C_Append_Pragma_Newline | ( | TOKEN_BUFFER | tokens, |
SRCPOS | srcpos | ||
) | [static] |
Definition at line 2995 of file wn2c.cxx.
References Current_Indentation(), Set_Current_Indentation(), and WN2C_Stmt_Newline().
Referenced by WN2C_Callsite_Directives(), 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 1983 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 3214 of file wn2c.cxx.
References Append_Indented_Newline(), Current_Indentation(), and Set_Current_Indentation().
Referenced by WN2C_Prompf_Construct_End(), and WN2C_Prompf_Construct_Start().
void WN2C_Append_Purple_Funcinfo | ( | TOKEN_BUFFER | tokens | ) |
Definition at line 3133 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), EXPORT_INTERNAL, name, Number_as_String(), PUINFO_FUNC_ST, PUINFO_FUNC_ST_IDX, SCLASS_TEXT, ST_export(), ST_sclass(), 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 2239 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Indented_Newline(), Append_Token_Special(), 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 2190 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Indented_Newline(), Append_Token_Special(), New_Token_Buffer(), NULL, Set_TY_is_written(), 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 2378 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, init_map(), lookup(), MTYPE_F8, New_Token_Buffer(), NULL, SCLASS_COMMON, SCLASS_CPLINIT, SCLASS_DGLOBAL, SCLASS_EXTERN, SCLASS_FORMAL, SCLASS_FORMAL_REF, SCLASS_FSTATIC, SCLASS_PSTATIC, SCLASS_UGLOBAL, ST2C_decl_translate(), ST2C_weakext_translate(), ST_class(), ST_is_const_var(), ST_is_not_used(), ST_is_weak_symbol(), ST_name(), 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(), TY_mtype(), TY_ret_type(), 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 5037 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), 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, Is_True, New_Token_Buffer(), OPR_ARRAY, Prepend_Token_Special(), Set_TY_ptr_as_array(), Stab_Array_Has_Dynamic_Bounds(), STATUS_is_array_as_address, STATUS_is_lvalue, STATUS_set_array_as_address, STATUS_set_lvalue, TRUE, TY_AR_etype(), TY_Is_Array(), TY_Is_Pointer(), TY_pointed(), TY_ptr_as_array(), TY_size(), Ty_Table, WHIRL2C_parenthesize(), WN2C_Normalize_Idx_To_Onedim(), WN2C_prepend_cast(), WN2C_translate(), WN_array_index, WN_element_size(), WN_kid0(), WN_num_dim, WN_operator(), and WN_Tree_Type().
static void WN2C_Assign_Complex_Const | ( | TOKEN_BUFFER | tokens, |
const char * | lhs_name, | ||
TCON | realpart, | ||
TCON | imagpart | ||
) | [static] |
Definition at line 1013 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 | ||
) | [static] |
Definition at line 1647 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), EMPTY_STATUS, FALSE, TY2C_Fld_Info::found_fld, FLD_HANDLE::Is_Null(), Is_True, MTYPE_I1, NULL, Prepend_Token_Special(), TY2C_Fld_Info::select_tokens, Stab_Mtype_To_Ty(), Stab_Pointer_To(), STATUS_set_lvalue, TRUE, TY2C_get_field_info(), TY_Is_Pointer(), TY_Is_Structured(), TY_mtype(), TY_pointed(), TY_size(), WHIRL2C_parenthesize(), WN2C_append_addr_plus_const(), WN2C_array_lvalue_as_ptr, WN2C_assignment_compatible_types, WN2C_compatible_lvalues, 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 3380 of file wn2c.cxx.
References FALSE, Is_True, 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 3531 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Cplus_Initialization(), Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), 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_set_block, TRUE, 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().
Definition at line 5441 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, OPR_BNOR, Stab_Mtype_To_Ty(), WN2C_Translate_Arithmetic_Operand(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
Definition at line 4611 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), Append_Token_String(), CALLSITE_call, CALLSITE_next, CONTEXT_reset_top_level_expr, CONTEXT_set_given_lvalue_ty, CONTEXT_set_top_level_expr, EMPTY_STATUS, Unparse_Target::Func_Return_To_Param(), Unparse_Target::Func_Return_Type(), 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, W2X_Unparse_Target, WHIRL2C_parenthesize(), WN2C_Callsite_Directives(), WN2C_Function_Call_Lhs(), WN2C_Prev_CallSite, 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(), WN_Tree_Type(), 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 3006 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 5951 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 4836 of file wn2c.cxx.
References Append_Token_String(), Concat3_Strings(), EMPTY_STATUS, Index_To_Str(), Is_True, OPR_COMMENT, WN_GetComment(), and WN_operator().
static STATUS WN2C_compgoto | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 3773 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, OPCODE_has_field_id(), OPR_COMPGOTO, OPR_GOTO, STATUS_set_block, TCON2C_translate(), TY_mtype(), WN2C_translate(), WN_compgoto_has_default_case, WN_compgoto_idx, WN_compgoto_num_cases, WN_compgoto_table, WN_field_id(), WN_first(), WN_kid(), WN_next(), WN_opcode(), WN_operator(), WN_rtype(), and WN_Tree_Type().
static STATUS WN2C_complex | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 5393 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, W2CF_Symtab_Nameof_Tempvar(), WN2C_translate(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
static STATUS WN2C_compose_bits | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 6104 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), Host_To_Targ(), Is_True, MTYPE_I4, OPR_COMPOSE_BITS, TCON2C_translate(), WN2C_translate(), WN_bit_offset(), WN_bit_size(), WN_kid1(), and WN_operator().
static STATUS WN2C_condbr | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 4171 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, 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 5902 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(), W2CF_Symtab_Nameof_Tempvar(), WN2C_Assign_Complex_Const(), WN_operator(), WN_st(), and WN_Tree_Type().
static void WN2C_create_ref_param_lda | ( | WN * | lda, |
const WN * | ldid | ||
) | [static] |
Definition at line 1968 of file wn2c.cxx.
References bzero(), MTYPE_V, OPR_LDA, Stab_Pointer_To(), TY_mtype(), WN_load_offset(), WN_map_id(), WN_set_kid_count(), WN_set_opcode(), WN_set_ty(), WN_st_idx(), and WN_ty().
Referenced by WN2C_iload(), and WN2C_istore().
Definition at line 5282 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CONTEXT_reset_needs_lvalue, EMPTY_STATUS, FALSE, Is_True, New_Token_Buffer(), OPR_CVT, Stab_Mtype_To_Ty(), WHIRL2C_parenthesize(), WN2C_prepend_cast(), WN2C_translate(), WN_kid0(), WN_opc_rtype, and WN_operator().
Definition at line 5305 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CONTEXT_reset_needs_lvalue, FALSE, Is_True, New_Token_Buffer(), OPR_CVTL, 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 6052 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), 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 2504 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 2486 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().
static void WN2C_decr_indentation_for_stmt_body | ( | const WN * | body | ) | [static] |
Definition at line 955 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 3960 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, 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 4013 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, EMPTY_STATUS, Is_True, OPR_DO_WHILE, 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 3315 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 3343 of file wn2c.cxx.
References WN2C_Is_Loop_Region(), WN2C_Is_Parallel_Region(), and WN2C_Prompf_Construct_End().
Referenced by WN2C_region().
Definition at line 4775 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 4271 of file wn2c.cxx.
References Append_Token_String(), CONTEXT_srcpos, Current_Indentation(), EMPTY_STATUS, Set_Current_Indentation(), and WN2C_Stmt_Newline().
static STATUS WN2C_exc_scope_end | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 4257 of file wn2c.cxx.
References Append_Token_String(), CONTEXT_srcpos, Current_Indentation(), EMPTY_STATUS, Set_Current_Indentation(), and WN2C_Stmt_Newline().
static STATUS WN2C_extract_bits | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 6076 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), Host_To_Targ(), Is_True, MTYPE_I4, OPR_EXTRACT_BITS, TCON2C_translate(), WN2C_translate(), WN_bit_offset(), WN_bit_size(), WN_kid0(), and WN_operator().
void WN2C_finalize | ( | void | ) |
Definition at line 6167 of file wn2c.cxx.
References Stab_Free_Tmpvars().
Referenced by W2C_Fini().
static STATUS WN2C_func_entry | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 3431 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), Compile_Upc, CONTEXT_set_incomplete_ty2c, CONTEXT_set_new_func_scope, CONTEXT_set_srcpos, CONTEXT_srcpos, Decrement_Indentation(), EMPTY_STATUS, FALSE, Increment_Indentation(), Is_True, NULL, OPR_FUNC_ENTRY, OPR_IDNAME, PUinfo_Get_ReturnSites(), PUinfo_pragmas, ST2C_func_header(), ST2C_use_translate(), St_Table, W2C_No_Pragmas, W2C_Prompf_Emission, WN2C_Next_ReturnSite, WN2C_pragma_list_begin(), WN2C_pragma_list_end(), WN2C_Prev_CallSite, 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_Get_Linenum(), 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 1365 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, 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 2610 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CALLSITE_in_regs, CALLSITE_return_var, CALLSITE_store1, CALLSITE_var_offset, CLASS_PREG, CONTEXT_srcpos, FALSE, Is_True, KIND_POINTER, KIND_SCALAR, MTYPE_V, New_Token_Buffer(), NULL, OPR_ISTORE, OPR_LDID, Pointer_Mtype, 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_is_lvalue, TRUE, TY_Is_Pointer(), TY_Is_Preg_Type(), TY_kind(), TY_mtype(), TY_pointed(), TY_size(), 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_Prev_CallSite, 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 2840 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_is_lvalue, TRUE, TY_Is_Preg_Type(), TY_size(), WN2C_assignment_compatible_types, WN2C_lvalue_st(), WN2C_Next_ReturnSite, 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 TOKEN_BUFFER WN2C_generate_cast | ( | TY_IDX | cast_to, |
BOOL | pointer_to_type | ||
) | [static] |
Definition at line 967 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 4142 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().
Definition at line 4085 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, 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] |
Definition at line 3360 of file wn2c.cxx.
References EMPTY_STATUS.
static STATUS WN2C_iload | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 4849 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_String(), buf, Current_Indentation(), EMPTY_STATUS, FALSE, Is_True, New_Token_Buffer(), OPR_ILOAD, OPR_LDID, SCLASS_FORMAL_REF, Set_Current_Indentation(), ST_sclass(), TY_Is_Pointer(), W2C_Emit_Prefetch, W2C_Only_Mark_Loads, WN2C_arithmetic_compatible_types, WN2C_create_ref_param_lda(), WN2C_memref_lhs(), WN2C_Prefetch_Map(), WN2C_prepend_cast(), 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_ldid().
static STATUS WN2C_iloadx | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 4935 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 5361 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().
static void WN2C_incr_indentation_for_stmt_body | ( | const WN * | body | ) | [static] |
Definition at line 943 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 1239 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), Append_Token_Special(), 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().
void WN2C_initialize | ( | void | ) |
Definition at line 6136 of file wn2c.cxx.
References NUMBER_OF_OPC2CNAME_MAPS, NUMBER_OF_OPERATORS, NUMBER_OF_OPR2HANDLER_MAPS, WN2C_Opc2cname, WN2C_Opc2cname_Map, WN2C_Opr_Handler, WN2C_Opr_Handler_Map, and WN2C_unsupported().
Referenced by W2C_Init().
static STATUS WN2C_intconst | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 5938 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().
static STATUS WN2C_intrinsic_op | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 5178 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, Is_True, New_Token_Buffer(), OPR_INTRINSIC_OP, Stab_Mtype_To_Ty(), TY_mtype(), 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(), WN_operator(), and WN_Tree_Type().
static BOOL WN2C_Is_Loop_Region | ( | const WN * | region, |
CONTEXT | context | ||
) | [static] |
Definition at line 3225 of file wn2c.cxx.
References 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().
static BOOL WN2C_Is_Parallel_Region | ( | const WN * | region, |
CONTEXT | context | ||
) | [static] |
Definition at line 3248 of file wn2c.cxx.
References 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 127 of file wn2c.cxx.
References 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().
static STATUS WN2C_istore | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 4285 of file wn2c.cxx.
References EMPTY_STATUS, Get_Field_Type(), Is_True, Make_Pointer_Type(), New_Token_Buffer(), OPR_ISTORE, OPR_STID, SCLASS_FORMAL_REF, ST_sclass(), TY_Is_Pointer(), TY_pointed(), W2C_Emit_Prefetch, WN2C_Append_Assignment(), WN2C_create_ref_param_lda(), 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 4357 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 4244 of file wn2c.cxx.
References Append_Token_Special(), EMPTY_STATUS, Is_True, OPR_LABEL, WN2C_append_label_name(), and WN_operator().
Definition at line 5763 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, Get_Field_Type(), Is_True, 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_is_lvalue, STATUS_reset_lvalue, STC_val(), TCON2C_translate(), TCON_ty, TY_Is_Complex(), TY_Is_Pointer(), TY_Is_Structured(), TY_mtype(), TY_pointed(), 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(), and WN_ty().
Definition at line 5581 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, Get_Field_Type(), Is_True, KIND_POINTER, KIND_VOID, MTYPE_C4, MTYPE_C8, MTYPE_CQ, 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(), Prepend_Token_String(), PUinfo_Preg_Type(), Scalar_C_Names, SCLASS_FORMAL_REF, Set_ST_type(), ST2C_Declare_Tempvar(), ST_sclass(), ST_sym_class(), ST_type(), Stab_Lock_Tmpvar(), Stab_Pointer_To(), Stab_Unlock_Tmpvar(), STATUS_is_lvalue, TRUE, TY_Is_Pointer(), TY_Is_Structured(), TY_kind(), TY_mtype(), TY_name(), TY_pointed(), Ty_Table, W2C_Only_Mark_Loads, W2CF_Symtab_Nameof_Tempvar(), WN2C_Append_Preg(), WN2C_arithmetic_compatible_types, WN2C_iload(), WN2C_lvalue_st(), WN2C_prepend_cast(), WN2C_SymAccess_Type(), WN_field_id(), WN_load_offset(), WN_opc_dtype, WN_operator(), WN_st(), and WN_ty().
Referenced by 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 2025 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 2570 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_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 | ||
) | [static] |
Definition at line 1820 of file wn2c.cxx.
References Append_Token_String(), CLASS_CONST, CLASS_FUNC, CLASS_PREG, Compile_Upc, EMPTY_STATUS, Is_True, ST2C_use_translate(), ST_base(), ST_full(), ST_is_split_common(), ST_name(), 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_set_lvalue, STC_val(), TCON2C_translate(), TRUE, WN2C_based_lvalue(), and WN_intrinsic_name().
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 1893 of file wn2c.cxx.
References 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, NULL, OPR_ADD, OPR_ARRAY, Stab_Pointer_To(), STATUS_is_lvalue, TY_Is_Pointer(), TY_pointed(), WN2C_based_lvalue(), WN2C_translate(), WN_Get_PtrAdd_Intconst(), WN_kid0(), WN_kid1(), WN_operator(), and WN_Tree_Type().
Referenced by WN2C_address_add(), WN2C_Function_Call_Lhs(), WN2C_memref_lhs(), WN2C_mload(), and WN2C_mstore().
Definition at line 5467 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, 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 1422 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 6358 of file wn2c.cxx.
References Prepend_Token_Special(), STATUS_is_lvalue, TY_Is_Pointer(), 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 4976 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(), 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 4404 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(), Is_True, MTYPE_I8, MTYPE_M, New_Token_Buffer(), OPR_INTCONST, OPR_MLOAD, OPR_MSTORE, OPR_TAS, Prepend_Token_Special(), ST2C_Declare_Tempvar(), Stab_Lock_Tmpvar(), Stab_Pointer_To(), Stab_Unlock_Tmpvar(), STATUS_is_lvalue, TCON2C_translate(), TRUE, TY_Is_Pointer(), TY_Is_Structured(), TY_pointed(), TY_size(), 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().
Definition at line 5495 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, OPR_SUB, Stab_Mtype_To_Ty(), WN2C_Translate_Arithmetic_Operand(), WN_kid(), WN_kid0(), WN_kid1(), WN_opc_rtype, and WN_operator().
BOOL WN2C_new_symtab | ( | void | ) |
Definition at line 6179 of file wn2c.cxx.
References 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 5523 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, 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 5552 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, 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 2135 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_top_level_expr, 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 5376 of file wn2c.cxx.
References Append_Token_Special(), CONTEXT_set_top_level_expr, Is_True, OPR_PAREN, WN2C_translate(), WN_kid0(), and WN_operator().
Definition at line 6001 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, TY_IDX_ZERO, WN2C_assignment_compatible_types, 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 4786 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Token_Special(), Append_Token_String(), Concat2_Strings(), Concat3_Strings(), Current_Indentation(), EMPTY_STATUS, 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(), 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 3176 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 993 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_parm(), WN2C_tas(), and WN2C_Translate_Arithmetic_Operand().
static void WN2C_Prompf_Construct_End | ( | TOKEN_BUFFER | tokens, |
const WN * | construct | ||
) | [static] |
Definition at line 3285 of file wn2c.cxx.
References Append_Token_String(), 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 3269 of file wn2c.cxx.
References Append_Token_String(), 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_rcomma | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 5969 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(), 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 5346 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 3691 of file wn2c.cxx.
References Append_Token_String(), 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 4204 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(), WN2C_Next_ReturnSite, and WN_operator().
static STATUS WN2C_return_val | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 4231 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), buf, EMPTY_STATUS, Is_True, OPR_RETURN_VAL, WN2C_translate(), WN_kid0(), and WN_operator().
static STATUS WN2C_select | ( | TOKEN_BUFFER | tokens, |
const WN * | wn, | ||
CONTEXT | context | ||
) | [static] |
Definition at line 5258 of file wn2c.cxx.
References Append_Token_Special(), EMPTY_STATUS, Is_True, OPR_CSELECT, OPR_SELECT, WN2C_translate(), WN_kid(), WN_kid0(), WN_kid1(), and WN_operator().
static BOOL WN2C_Skip_Stmt | ( | const WN * | stmt | ) | [static] |
Definition at line 203 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, W2C_Emit_Prefetch, W2C_No_Pragmas, WN2C_Next_ReturnSite, WN2C_Prev_CallSite, 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 3301 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 3329 of file wn2c.cxx.
References WN2C_Is_Loop_Region(), WN2C_Is_Parallel_Region(), and WN2C_Prompf_Construct_Start().
Referenced by WN2C_region().
Definition at line 4560 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(), WN2C_Append_Assignment(), 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 | ||
) |
Definition at line 6408 of file wn2c.cxx.
References CLASS_PREG, Prepend_Token_Special(), PUinfo_Preg_Type(), ST_sym_class(), ST_type(), 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 919 of file wn2c.cxx.
References Append_Indented_Newline(), Append_Srcpos_Directive(), Append_Srcpos_Map(), 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_Prefetch_Map(), 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 2530 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_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 3862 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, OPCODE_has_field_id(), OPR_CASEGOTO, OPR_GOTO, OPR_SWITCH, STATUS_set_block, TCON2C_translate(), TY_mtype(), WN2C_translate(), WN_compgoto_idx, WN_const_val(), WN_field_id(), WN_first(), WN_next(), WN_opcode(), WN_operator(), WN_rtype(), 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 1483 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().
Definition at line 5232 of file wn2c.cxx.
References Append_And_Reclaim_Token_List(), CONTEXT_reset_needs_lvalue, FALSE, Is_True, New_Token_Buffer(), OPR_TAS, WN2C_arithmetic_compatible_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 6196 of file wn2c.cxx.
References wn, 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_compose_bits(), WN2C_condbr(), WN2C_cvt(), WN2C_cvtl(), WN2C_dealloca(), WN2C_do_loop(), WN2C_do_while(), WN2C_eval(), WN2C_extract_bits(), 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 1041 of file wn2c.cxx.
References CONTEXT_set_top_level_expr, FALSE, New_Token_Buffer(), WHIRL2C_parenthesize(), WN2C_arithmetic_compatible_types, WN2C_prepend_cast(), WN2C_translate(), and WN_Tree_Type().
Referenced by WN2C_address_add(), WN2C_bnor(), 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 3107 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().
STATUS WN2C_translate_file_scope_defs | ( | CONTEXT | context | ) |
Definition at line 6218 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 6255 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(), 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 3034 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, NULL, Number_as_String(), OPR_ASSERT, OPR_BACKWARD_BARRIER, OPR_CALL, OPR_DO_LOOP, OPR_DO_WHILE, OPR_FORWARD_BARRIER, OPR_PICCALL, OPR_PRAGMA, OPR_REGION, OPR_TRAP, OPR_WHILE_DO, OPR_XPRAGMA, 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().
void WN2C_translate_structured_types | ( | void | ) |
Definition at line 6208 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 3409 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 3367 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 4050 of file wn2c.cxx.
References Append_Token_Special(), Append_Token_String(), CONTEXT_set_srcpos, CONTEXT_srcpos, Is_True, OPR_WHILE_DO, 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.
bool init = false [static] |
Definition at line 2288 of file wn2c.cxx.
Referenced by init_map(), and INITV_index().
char Name_Unknown_Type[] = "__UNKNOWN_TYPE" [static] |
const SCALAR_C_NAME Scalar_C_Names[MTYPE_PREDEF+1] [static] |
{{"void", Name_Unknown_Type}, {"char", "_BOOLEAN"}, {"signed char", "_INT8"}, {"signed short", "_INT16"}, {"signed int", "_INT32"}, {"signed long long", "_INT64"}, {"unsigned char", "_UINT8"}, {"unsigned short", "_UINT16"}, {"unsigned int", "_UINT32"}, {"unsigned long long", "_UINT64"}, {"float", "_IEEE32"}, {"double", "_IEEE64"}, {Name_Unknown_Type, "_IEEE80"}, {Name_Unknown_Type, "_IEEE128"} }
Definition at line 184 of file wn2c.cxx.
Referenced by WN2C_ldid().
const char TY2C_Aligned_Block_Name[] = "__block" |
hash_set<const char*, hash<const char*>, eqstr> upcr_internal [static] |
Definition at line 2287 of file wn2c.cxx.
Referenced by init_map(), and lookup().
const RETURNSITE* WN2C_Next_ReturnSite = NULL [static] |
Definition at line 165 of file wn2c.cxx.
Referenced by WN2C_func_entry(), WN2C_Function_Return_Value(), WN2C_return(), and WN2C_Skip_Stmt().
const char* WN2C_Opc2cname[NUMBER_OF_OPCODES] [static] |
Definition at line 443 of file wn2c.cxx.
Referenced by WN2C_funcall_op(), WN2C_infix_op(), and WN2C_initialize().
const OPC2CNAME_MAP WN2C_Opc2cname_Map[] [static] |
Definition at line 454 of file wn2c.cxx.
Referenced by WN2C_initialize().
Definition at line 302 of file wn2c.cxx.
Referenced by WN2C_initialize(), and WN2C_translate().
const OPR2HANDLER WN2C_Opr_Handler_Map[] [static] |
Definition at line 313 of file wn2c.cxx.
Referenced by WN2C_initialize().
const CALLSITE* WN2C_Prev_CallSite = NULL [static] |
Definition at line 166 of file wn2c.cxx.
Referenced by WN2C_call(), WN2C_func_entry(), WN2C_Function_Call_Lhs(), and WN2C_Skip_Stmt().
const char WN2C_Purple_Region_Name[] = "prp___region" [static] |
Definition at line 154 of file wn2c.cxx.
Referenced by WN2C_Append_Purple_Funcinfo(), and WN2C_block().
const char WN2C_Return_Value_Name[] = "_RetVal" [static] |
Definition at line 155 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 156 of file wn2c.cxx.
Referenced by WN2C_block(), WN2C_func_entry(), and WN2C_Function_Return_Value().