X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fsparc%2Fbearch_sparc_t.h;h=b69f5c536dacb867ab4d97a82f30e9700196a102;hb=b5092879c450022efcb43edac2a662cb84fa0ae4;hp=3afee30d606b58614f12570187dd7f2b1b4b1b77;hpb=36a16c275005b032e346f934047c2de8fdb3811f;p=libfirm diff --git a/ir/be/sparc/bearch_sparc_t.h b/ir/be/sparc/bearch_sparc_t.h index 3afee30d6..b69f5c536 100644 --- a/ir/be/sparc/bearch_sparc_t.h +++ b/ir/be/sparc/bearch_sparc_t.h @@ -22,39 +22,21 @@ * @brief declarations for SPARC backend -- private header * @version $Id$ */ -#ifndef FIRM_BE_SPARC_BEARCH_TEMPLATE_T_H -#define FIRM_BE_SPARC_BEARCH_TEMPLATE_T_H +#ifndef FIRM_BE_SPARC_BEARCH_SPARC_T_H +#define FIRM_BE_SPARC_BEARCH_SPARC_T_H -#include "debug.h" +#include #include "sparc_nodes_attr.h" #include "be.h" -#include "../beemitter.h" -#include "set.h" - -// sparc ABI requires a min stacksize to -// save registers in case of a trap etc. -// by now we assume only non-leaf procedures: 92 + 4 (padding) -#define SPARC_MIN_STACKSIZE 112 typedef struct sparc_transform_env_t sparc_transform_env_t; -typedef struct _sparc_isa_t sparc_isa_t; - -typedef struct _sparc_code_gen_t { - const arch_code_generator_if_t *impl; /**< implementation */ - ir_graph *irg; /**< current irg */ - set *reg_set; /**< set to memorize registers for FIRM nodes (e.g. phi) */ - sparc_isa_t *isa; /**< the isa instance */ - be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */ - char dump; /**< set to 1 if graphs should be dumped */ -} sparc_code_gen_t; - +typedef struct sparc_isa_t sparc_isa_t; -struct _sparc_isa_t { - arch_env_t arch_env; /**< must be derived from arch_env_t */ - sparc_code_gen_t *cg; /**< current code generator */ +struct sparc_isa_t { + arch_env_t base; /**< must be derived from arch_env_t */ + pmap *constants; }; - /** * this is a struct to minimize the number of parameters * for transformation walker @@ -67,6 +49,19 @@ struct sparc_transform_env_t { ir_mode *mode; /**< The mode of the irn */ }; -void sparc_finish_irg(sparc_code_gen_t *cg); +/** + * Sparc ABI requires some space which is always available at the top of + * the stack. It contains: + * 16*4 bytes space for spilling the register window + * 1*4 byte holding a pointer to space for agregate returns (the space is + * always reserved, regardless wether we have an agregate return + * or not) + * 6*4 bytes Space for spilling parameters 0-5. For the cases when someone + * takes the adress of a parameter. I guess this is also there so + * the implementation of va_args gets easier -> We can simply store + * param 0-5 in this spaces and then handle va_next by simply + * incrementing the stack pointer + */ +#define SPARC_MIN_STACKSIZE 92 #endif