QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
statements.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  operand_s
 
struct  sblock_s
 
struct  statement_s
 
struct  tempop_t
 

Typedefs

typedef struct operand_s operand_t
 
typedef struct sblock_s sblock_t
 
typedef struct statement_s statement_t
 

Enumerations

enum  op_type_e {
  op_def, op_value, op_label, op_temp,
  op_alias
}
 
enum  st_type_t {
  st_none, st_expr, st_assign, st_ptrassign,
  st_move, st_state, st_func, st_flow
}
 Overall type of statement. More...
 

Functions

operand_talias_operand (etype_t type, operand_t *op)
 
operand_tdef_operand (struct def_s *def, struct type_s *type)
 
void dot_sblock (struct dstring_s *dstr, sblock_t *sblock, int blockno)
 
void dump_dot_sblock (void *data, const char *fname)
 
void free_operand (operand_t *op)
 
sblock_tmake_statements (struct expr_s *expr)
 
sblock_tnew_sblock (void)
 
statement_tnew_statement (st_type_t type, const char *opcode, struct expr_s *expr)
 
const char * operand_string (operand_t *op)
 
const char * optype_str (op_type_e type)
 
void print_sblock (sblock_t *sblock, const char *filename)
 
void print_statement (statement_t *s)
 
void sblock_add_statement (sblock_t *sblock, statement_t *statement)
 
sblock_tstatement_get_target (statement_t *s)
 
sblock_t ** statement_get_targetlist (statement_t *s)
 
int statement_is_call (statement_t *s)
 
int statement_is_cond (statement_t *s)
 
int statement_is_goto (statement_t *s)
 
int statement_is_jumpb (statement_t *s)
 
int statement_is_return (statement_t *s)
 
void statements_count_temps (sblock_t *sblock)
 
operand_ttemp_operand (struct type_s *type)
 
operand_tvalue_operand (struct ex_value_s *value)
 

Typedef Documentation

typedef struct operand_s operand_t
typedef struct sblock_s sblock_t
typedef struct statement_s statement_t

Enumeration Type Documentation

enum op_type_e
Enumerator
op_def 
op_value 
op_label 
op_temp 
op_alias 
enum st_type_t

Overall type of statement.

Statement types are broken down into expressions (binary and unary, includes address and pointer dereferencing (read)), assignment, pointer assignment (write to dereference pointer), move (special case of pointer assignment), state, function related (call, rcall, return and done), and flow control (conditional branches, goto, jump (single pointer and jump table)).

Enumerator
st_none 

not a (valid) statement. Used in dags.

st_expr 

c = a op b; or c = op a;

st_assign 

b = a

st_ptrassign 

*b = a; or *(b + c) = a;

st_move 

memcpy (c, a, b);

st_state 

state (a, b); or state (a, b, c)

st_func 

call, rcall or return/done

st_flow 

if/ifa/ifae/ifb/ifbe/ifnot or goto or jump/jumpb

Function Documentation

operand_t* alias_operand ( etype_t  type,
operand_t op 
)
operand_t* def_operand ( struct def_s def,
struct type_s type 
)
void dot_sblock ( struct dstring_s dstr,
sblock_t sblock,
int  blockno 
)
void dump_dot_sblock ( void *  data,
const char *  fname 
)
void free_operand ( operand_t op)
sblock_t* make_statements ( struct expr_s expr)
sblock_t* new_sblock ( void  )
statement_t* new_statement ( st_type_t  type,
const char *  opcode,
struct expr_s expr 
)
const char* operand_string ( operand_t op)
const char* optype_str ( op_type_e  type)
void print_sblock ( sblock_t sblock,
const char *  filename 
)
void print_statement ( statement_t s)
void sblock_add_statement ( sblock_t sblock,
statement_t statement 
)
sblock_t* statement_get_target ( statement_t s)
sblock_t** statement_get_targetlist ( statement_t s)
int statement_is_call ( statement_t s)
int statement_is_cond ( statement_t s)
int statement_is_goto ( statement_t s)
int statement_is_jumpb ( statement_t s)
int statement_is_return ( statement_t s)
void statements_count_temps ( sblock_t sblock)
operand_t* temp_operand ( struct type_s type)
operand_t* value_operand ( struct ex_value_s value)