X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fia32%2Fia32_address_mode.h;h=ff9e43eabf3c99662580e68e4e471041dbeac4aa;hb=3f807bf48426a29da4129ff29c44a4b4690c45f6;hp=59cd30c7b0645682acd6424b079693037ec73631;hpb=3b30943ac5097c10b4d681189b80d8d0e694ac7c;p=libfirm diff --git a/ir/be/ia32/ia32_address_mode.h b/ir/be/ia32/ia32_address_mode.h index 59cd30c7b..ff9e43eab 100644 --- a/ir/be/ia32/ia32_address_mode.h +++ b/ir/be/ia32/ia32_address_mode.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -20,28 +20,51 @@ /** * @file * @brief This file contains functions for matching firm graphs for - * nodes that can be used as addressmode for x86 commands + * nodes that can be used as address mode for x86 instructions * @author Matthias Braun - * @version $Id: ia32_transform.c 15462 2007-08-03 16:50:59Z matze $ + * @version $Id$ */ #ifndef IA32_ADDRESS_MODE_H #define IA32_ADDRESS_MODE_H #include "irtypes.h" +#include "../beirg.h" +/** + * The address mode data: Used to construct (memory) address modes. + */ typedef struct ia32_address_t ia32_address_t; struct ia32_address_t { - ir_node *base; - ir_node *index; - ir_node *mem; - int offset; - int scale; - ir_entity *symconst_ent; - int use_frame; - ir_entity *frame_entity; - int symconst_sign; + ir_node *base; /**< The base register (if any) */ + ir_node *index; /**< The index register (if any). */ + ir_node *mem; /**< The memory value (if any). */ + 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 */ + ir_entity *frame_entity; /**< The accessed frame entity if any. */ + int symconst_sign; /**< The "sign" of the symconst. */ }; +/** + * Create an address mode for a given node. + */ void ia32_create_address_mode(ia32_address_t *addr, ir_node *node, int force); +/** + * 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); + +/** + * Free the non_address_mode information. + */ +void ia32_free_non_address_mode_nodes(void); + +/** + * mark a node so it will not be used as part of address modes + */ +void ia32_mark_non_am(ir_node *node); + #endif