Fixed bitfield size (need an extra bit for the sign :-(
[r8496]
* Modified by: Goetz Lindenmaier, Michael Beck
* Created:
* CVS-ID: $Id$
* Modified by: Goetz Lindenmaier, Michael Beck
* Created:
* CVS-ID: $Id$
- * Copyright: (c) 1998-2006 Universität Karlsruhe
+ * Copyright: (c) 1998-2007 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
#undef X
} /* get_allocation_name */
#undef X
} /* get_allocation_name */
ir_visibility
(get_entity_visibility)(const ir_entity *ent) {
return _get_entity_visibility(ent);
ir_visibility
(get_entity_visibility)(const ir_entity *ent) {
return _get_entity_visibility(ent);
_set_entity_address_taken(ent, flag);
} /* set_entity_address_taken */
_set_entity_address_taken(ent, flag);
} /* set_entity_address_taken */
+/* Return the name of the address_taken state. */
+const char *get_address_taken_state_name(ir_address_taken_state state) {
+#define X(a) case a: return #a
+ switch (state) {
+ X(ir_address_not_taken);
+ X(ir_address_taken_unknown);
+ X(ir_address_taken);
+ default: return "BAD VALUE";
+ }
+#undef X
+} /* get_address_taken_state_name */
+
/* Get the entity's stickyness */
ir_stickyness
(get_entity_stickyness)(const ir_entity *ent) {
/* Get the entity's stickyness */
ir_stickyness
(get_entity_stickyness)(const ir_entity *ent) {
/** Sets/resets the state of the address taken flag of an entity. */
void set_entity_address_taken(ir_entity *ent, ir_address_taken_state flag);
/** Sets/resets the state of the address taken flag of an entity. */
void set_entity_address_taken(ir_entity *ent, ir_address_taken_state flag);
+/** Return the name of the address_taken state. */
+const char *get_address_taken_state_name(ir_address_taken_state state);
+
/* -- Representation of constant values of entities -- */
/**
* Returns true if the the node is representable as code on
/* -- Representation of constant values of entities -- */
/**
* Returns true if the the node is representable as code on
* Modified by: Goetz Lindenmaier, Michael Beck
* Created:
* CVS-ID: $Id$
* Modified by: Goetz Lindenmaier, Michael Beck
* Created:
* CVS-ID: $Id$
- * Copyright: (c) 1998-2006 Universität Karlsruhe
+ * Copyright: (c) 1998-2007 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
ir_volatility volatility:2; /**< Specifies volatility of entities content. */
ir_stickyness stickyness:2; /**< Specifies whether this entity is sticky. */
ir_peculiarity peculiarity:3; /**< The peculiarity of this entity. */
ir_volatility volatility:2; /**< Specifies volatility of entities content. */
ir_stickyness stickyness:2; /**< Specifies whether this entity is sticky. */
ir_peculiarity peculiarity:3; /**< The peculiarity of this entity. */
- ir_address_taken_state address_taken:2; /**< A flag that can be set to mark address taken entities. */
+ ir_address_taken_state address_taken:3; /**< A flag that can be set to mark address taken entities. */
unsigned final:1; /**< If set, this entity cannot be overridden. */
unsigned compiler_gen:1; /**< If set, this entity was compiler generated. */
int offset; /**< Offset in bytes for this entity. Fixed when layout
unsigned final:1; /**< If set, this entity cannot be overridden. */
unsigned compiler_gen:1; /**< If set, this entity was compiler generated. */
int offset; /**< Offset in bytes for this entity. Fixed when layout
-_set_entity_address_taken(ir_entity *ent, ir_address_taken_state flag) {
+_set_entity_address_taken(ir_entity *ent, ir_address_taken_state state) {
assert(ent && ent->kind == k_entity);
assert(ent && ent->kind == k_entity);
- ent->address_taken = flag;
+ assert(ir_address_not_taken <= state && state <= ir_address_taken);
+ ent->address_taken = state;