Defines | Typedefs | Functions

wn2c.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EMPTY_STATUS   0x000000000
#define STATUS_LVALUE   0x000000001
#define STATUS_ARRAY_AS_ADDRESS   0x000000002
#define STATUS_BLOCK   0x000000004
#define STATUS_is_lvalue(s)   ((s) & STATUS_LVALUE)
#define STATUS_set_lvalue(s)   ((s) = (s) | STATUS_LVALUE)
#define STATUS_reset_lvalue(s)   ((s) = (s) & ~STATUS_LVALUE)
#define STATUS_is_array_as_address(s)   ((s) & STATUS_ARRAY_AS_ADDRESS)
#define STATUS_set_array_as_address(s)   ((s) = (s) | STATUS_ARRAY_AS_ADDRESS)
#define STATUS_reset_array_as_address(s)   ((s) = (s) & ~STATUS_ARRAY_AS_ADDRESS)
#define STATUS_is_block(s)   ((s) & STATUS_LVALUE)
#define STATUS_set_block(s)   ((s) = (s) | STATUS_LVALUE)
#define STATUS_reset_block(s)   ((s) = (s) & ~STATUS_LVALUE)

Typedefs

typedef mUINT32 STATUS

Functions

void WN2C_Append_Purple_Funcinfo (TOKEN_BUFFER tokens)
void WN2C_initialize (void)
void WN2C_finalize (void)
BOOL WN2C_new_symtab (void)
STATUS WN2C_translate (TOKEN_BUFFER tokens, const WN *wn, CONTEXT context)
void WN2C_translate_structured_types (void)
STATUS WN2C_translate_file_scope_defs (CONTEXT context)
STATUS WN2C_translate_purple_main (TOKEN_BUFFER tokens, const WN *pu, const char *region_name, CONTEXT context)
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)
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)

Define Documentation

#define EMPTY_STATUS   0x000000000

Definition at line 99 of file wn2c.h.

#define STATUS_ARRAY_AS_ADDRESS   0x000000002

Definition at line 102 of file wn2c.h.

#define STATUS_BLOCK   0x000000004

Definition at line 104 of file wn2c.h.

#define STATUS_is_array_as_address (   s  )     ((s) & STATUS_ARRAY_AS_ADDRESS)

Definition at line 111 of file wn2c.h.

Referenced by WN2C_array().

#define STATUS_is_block (   s  )     ((s) & STATUS_LVALUE)

Definition at line 115 of file wn2c.h.

Referenced by WN2C_Translate_Stmt_Sequence().

#define STATUS_is_lvalue (   s  )     ((s) & STATUS_LVALUE)
#define STATUS_LVALUE   0x000000001

Definition at line 100 of file wn2c.h.

#define STATUS_reset_array_as_address (   s  )     ((s) = (s) & ~STATUS_ARRAY_AS_ADDRESS)

Definition at line 113 of file wn2c.h.

#define STATUS_reset_block (   s  )     ((s) = (s) & ~STATUS_LVALUE)

Definition at line 117 of file wn2c.h.

#define STATUS_reset_lvalue (   s  )     ((s) = (s) & ~STATUS_LVALUE)

Definition at line 109 of file wn2c.h.

Referenced by WN2C_lda().

#define STATUS_set_array_as_address (   s  )     ((s) = (s) | STATUS_ARRAY_AS_ADDRESS)

Definition at line 112 of file wn2c.h.

Referenced by WN2C_array().

#define STATUS_set_block (   s  )     ((s) = (s) | STATUS_LVALUE)

Definition at line 116 of file wn2c.h.

Referenced by WN2C_block(), WN2C_compgoto(), and WN2C_switch().

#define STATUS_set_lvalue (   s  )     ((s) = (s) | STATUS_LVALUE)

Definition at line 108 of file wn2c.h.

Referenced by WN2C_array(), WN2C_based_lvalue(), and WN2C_lvalue_st().


Typedef Documentation

typedef mUINT32 STATUS

Definition at line 96 of file wn2c.h.


Function Documentation

void WN2C_Append_Purple_Funcinfo ( TOKEN_BUFFER  tokens  ) 
void WN2C_finalize ( void   ) 

Definition at line 6167 of file wn2c.cxx.

References Stab_Free_Tmpvars().

Referenced by W2C_Fini().

Here is the call graph for this function:

void WN2C_initialize ( void   ) 

Definition at line 6136 of file wn2c.cxx.

References WN2C_Opc2cname, WN2C_Opc2cname_Map, WN2C_Opr_Handler, WN2C_Opr_Handler_Map, and WN2C_unsupported().

Referenced by W2C_Init().

Here is the call graph for this function:

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 
)
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().

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 
)
STATUS WN2C_translate ( TOKEN_BUFFER  tokens,
const WN wn,
CONTEXT  context 
)
STATUS WN2C_translate_file_scope_defs ( CONTEXT  context  ) 

Definition at line 6218 of file wn2c.cxx.

References CURRENT_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().

Here is the call graph for this function:

STATUS WN2C_translate_purple_main ( TOKEN_BUFFER  tokens,
const WN pu,
const char *  region_name,
CONTEXT  context 
)
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().

Here is the call graph for this function: