libFirm 1.20
SymConst node

A symbolic constant. More...

Data Structures

union  symconst_symbol
 SymConst attribute. More...

Defines

#define SYMCONST_HAS_TYPE(kind)   ((kind) <= symconst_type_align)
 Returns non-zero if s symconst kind has a type attribute.
#define SYMCONST_HAS_ENT(kind)   ((kind) == symconst_addr_ent || (kind) == symconst_ofs_ent)
 Returns non-zero if s symconst kind has an entity attribute.
#define SYMCONST_HAS_ENUM(kind)   ((kind) == symconst_enum_const)
 Returns non-zero if s symconst kind has an enum_const attribute.

Enumerations

enum  symconst_kind {
  symconst_type_size, symconst_type_align, symconst_addr_ent, symconst_ofs_ent,
  symconst_enum_const
}
 This enum names the different kinds of symbolic Constants represented by SymConst. More...

Functions

int is_SymConst_addr_ent (const ir_node *node)
 Returns true if node is a SymConst node with kind symconst_addr_ent.
symconst_kind get_SymConst_kind (const ir_node *node)
 Returns the kind of the SymConst.
void set_SymConst_kind (ir_node *node, symconst_kind num)
 Sets the kind of the SymConst.
ir_typeget_SymConst_type (const ir_node *node)
 Returns the type attribute of SymConst node node.
void set_SymConst_type (ir_node *node, ir_type *tp)
 Sets the type attribute of SymConst node node.
ir_entityget_SymConst_entity (const ir_node *node)
 Returns the entity attribute of SymConst node node.
void set_SymConst_entity (ir_node *node, ir_entity *ent)
 Sets the entity attribute of Symconst node node.
ir_enum_constget_SymConst_enum (const ir_node *node)
 Returns the enum attribute of SymConst node node.
void set_SymConst_enum (ir_node *node, ir_enum_const *ec)
 Sets the enum attribute of SymConst node node.
union symconst_symbol get_SymConst_symbol (const ir_node *node)
 Returns the symbol attribute of SymConst node node.
void set_SymConst_symbol (ir_node *node, union symconst_symbol sym)
 Sets the symbol attribute of SymConst node node.
int is_SymConst (const ir_node *node)
 Test if node is a SymConst.
ir_opget_op_SymConst (void)
 Returns opcode for SymConst nodes.

Variables

ir_opop_SymConst
 SymConst opcode.

Detailed Description

A symbolic constant.


Define Documentation

#define SYMCONST_HAS_ENT (   kind)    ((kind) == symconst_addr_ent || (kind) == symconst_ofs_ent)

Returns non-zero if s symconst kind has an entity attribute.

Definition at line 409 of file irnode.h.

#define SYMCONST_HAS_ENUM (   kind)    ((kind) == symconst_enum_const)

Returns non-zero if s symconst kind has an enum_const attribute.

Definition at line 412 of file irnode.h.

#define SYMCONST_HAS_TYPE (   kind)    ((kind) <= symconst_type_align)

Returns non-zero if s symconst kind has a type attribute.

Definition at line 406 of file irnode.h.


Enumeration Type Documentation

This enum names the different kinds of symbolic Constants represented by SymConst.

The content of the attribute symconst_symbol depends on this tag. Use the proper access routine after testing this flag.

Enumerator:
symconst_type_size 

The SymConst is the size of the given type.

symconst_symbol is type *.

symconst_type_align 

The SymConst is the alignment of the given type.

symconst_symbol is type *.

symconst_addr_ent 

The SymConst is a symbolic pointer to be filled in by the linker.

The pointer is represented by an entity. symconst_symbol is entity *.

symconst_ofs_ent 

The SymConst is the offset of its entity in the entities owner type.

symconst_enum_const 

The SymConst is a enumeration constant of an enumeration type.

Definition at line 298 of file firm_types.h.


Function Documentation

ir_op* get_op_SymConst ( void  )

Returns opcode for SymConst nodes.

ir_entity* get_SymConst_entity ( const ir_node node)

Returns the entity attribute of SymConst node node.

Note:
Only to access SymConst of kind addr_ent, else assertion.
ir_enum_const* get_SymConst_enum ( const ir_node node)

Returns the enum attribute of SymConst node node.

Only to access SymConst of kind symconst_enum_const, else assertion

symconst_kind get_SymConst_kind ( const ir_node node)

Returns the kind of the SymConst.

union symconst_symbol get_SymConst_symbol ( const ir_node node) [write]

Returns the symbol attribute of SymConst node node.

ir_type* get_SymConst_type ( const ir_node node)

Returns the type attribute of SymConst node node.

Note:
Only to access SymConst of kind type_siz, else assertion.
int is_SymConst ( const ir_node node)

Test if node is a SymConst.

Returns:
1 if the node is a SymConst node, 0 otherwise
int is_SymConst_addr_ent ( const ir_node node)

Returns true if node is a SymConst node with kind symconst_addr_ent.

void set_SymConst_entity ( ir_node node,
ir_entity ent 
)

Sets the entity attribute of Symconst node node.

void set_SymConst_enum ( ir_node node,
ir_enum_const ec 
)

Sets the enum attribute of SymConst node node.

void set_SymConst_kind ( ir_node node,
symconst_kind  num 
)

Sets the kind of the SymConst.

void set_SymConst_symbol ( ir_node node,
union symconst_symbol  sym 
)

Sets the symbol attribute of SymConst node node.

void set_SymConst_type ( ir_node node,
ir_type tp 
)

Sets the type attribute of SymConst node node.


Variable Documentation

SymConst opcode.

Definition at line 354 of file opcodes.h.