X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fbe%2Fia32%2Fia32_address_mode.h;h=08dbf66da13e0afd5258c0555b94626258ee5376;hb=9c4dff8011d48f5b07dd665fce3a3afdfaea7df8;hp=e7f8de1985e5cee3b0b3361a71eeed89e17fee19;hpb=abe11e75cade753e0f194780ec2fdbc33241f289;p=libfirm diff --git a/ir/be/ia32/ia32_address_mode.h b/ir/be/ia32/ia32_address_mode.h index e7f8de198..08dbf66da 100644 --- a/ir/be/ia32/ia32_address_mode.h +++ b/ir/be/ia32/ia32_address_mode.h @@ -27,6 +27,7 @@ #ifndef IA32_ADDRESS_MODE_H #define IA32_ADDRESS_MODE_H +#include #include "irtypes.h" #include "../beirg.h" @@ -41,21 +42,34 @@ struct ia32_address_t { int offset; /**< An integer offset. */ int scale; /**< An integer scale. {0,1,2,3} */ ir_entity *symconst_ent; /**< A SynConst entity if any. */ - int use_frame; /**< Set, if the frame is accessed */ + bool use_frame; /**< Set, if the frame is accessed */ + bool tls_segment; /**< Set if AM is relative to TLS */ ir_entity *frame_entity; /**< The accessed frame entity if any. */ - int symconst_sign; /**< The "sign" of the symconst. */ + bool symconst_sign; /**< The "sign" of the symconst. */ }; +/** + * Additional flags for the address mode creation. + */ +typedef enum ia32_create_am_flags_t { + ia32_create_am_normal = 0, /**< Normal operation. */ + ia32_create_am_force = 1U << 0, /**< Ignore the marking of node as a + non-address-mode node. */ + ia32_create_am_double_use = 1U << 1 /**< Fold AM, even if the root of + address calculation has two users. + This is useful for dest AM. */ +} ia32_create_am_flags_t; + /** * Create an address mode for a given node. */ -void ia32_create_address_mode(ia32_address_t *addr, ir_node *node, int force); +void ia32_create_address_mode(ia32_address_t *addr, ir_node *node, ia32_create_am_flags_t); /** * Mark those nodes of the given graph that cannot be used inside an * address mode because there values must be materialized in registers. */ -void ia32_calculate_non_address_mode_nodes(be_irg_t *birg); +void ia32_calculate_non_address_mode_nodes(ir_graph *irg); /** * Free the non_address_mode information. @@ -65,7 +79,7 @@ void ia32_free_non_address_mode_nodes(void); /** * Tells whether the given node is a non address mode node. */ -int ia32_is_non_address_mode_node(ir_node *node); +int ia32_is_non_address_mode_node(ir_node const *node); /** * mark a node so it will not be used as part of address modes