X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fsparc%2Fbearch_sparc_t.h;h=cf9777abc751888654b31e305afb429cbbe3af9f;hb=274626e2d58cfa247b88ee05adaca8906b025d93;hp=6e69d804ec20f3955a2e44bd850ca14d8b1e6ed0;hpb=ed0e4ce9a109277e1a63f48f2aca7750f473bc6a;p=libfirm diff --git a/ir/be/sparc/bearch_sparc_t.h b/ir/be/sparc/bearch_sparc_t.h index 6e69d804e..cf9777abc 100644 --- a/ir/be/sparc/bearch_sparc_t.h +++ b/ir/be/sparc/bearch_sparc_t.h @@ -21,7 +21,6 @@ * @file * @brief declarations for SPARC backend -- private header * @author Hannes Rapp, Matthias Braun - * @version $Id$ */ #ifndef FIRM_BE_SPARC_BEARCH_SPARC_T_H #define FIRM_BE_SPARC_BEARCH_SPARC_T_H @@ -30,24 +29,20 @@ #include "sparc_nodes_attr.h" #include "be.h" -typedef struct sparc_transform_env_t sparc_transform_env_t; typedef struct sparc_isa_t sparc_isa_t; +typedef struct calling_convention_t calling_convention_t; -struct sparc_isa_t { - arch_env_t base; /**< must be derived from arch_env_t */ - pmap *constants; +/** Floating point instruction set. */ +enum sparc_fp_architectures { + SPARC_FPU_ARCH_NONE = 0, + SPARC_FPU_ARCH_FPU = 0x00000001, + SPARC_FPU_ARCH_SOFTFLOAT = 0x00000002, }; -/** - * this is a struct to minimize the number of parameters - * for transformation walker - */ -struct sparc_transform_env_t { - dbg_info *dbg; /**< The node debug info */ - ir_graph *irg; /**< The irg, the node should be created in */ - ir_node *block; /**< The block, the node should belong to */ - ir_node *irn; /**< The irn, to be transformed */ - ir_mode *mode; /**< The mode of the irn */ +struct sparc_isa_t { + arch_env_t base; /**< must be derived from arch_env_t */ + pmap *constants; + int fpu_arch; /**< FPU architecture */ }; extern const arch_irn_ops_t sparc_irn_ops; @@ -65,9 +60,15 @@ extern const arch_irn_ops_t sparc_irn_ops; * param 0-5 in this spaces and then handle va_next by simply * incrementing the stack pointer */ -#define SPARC_MIN_STACKSIZE 92 -#define SPARC_IMMEDIATE_MIN -4096 -#define SPARC_IMMEDIATE_MAX 4095 +#define SPARC_IMMEDIATE_MIN -4096 +#define SPARC_IMMEDIATE_MAX 4095 +#define SPARC_MIN_STACKSIZE 92 +#define SPARC_AGGREGATE_RETURN_OFFSET 64 +#define SPARC_PARAMS_SPILL_OFFSET 68 +#define SPARC_SAVE_AREA_SIZE 64 +#define SPARC_N_PARAM_REGS 6 +#define SPARC_STACK_ALIGNMENT 8 +#define SPARC_REGISTER_SIZE 4 static inline bool sparc_is_value_imm_encodeable(int32_t value) { @@ -80,4 +81,8 @@ void sparc_introduce_prolog_epilog(ir_graph *irg); void sparc_lower_64bit(void); +bool sparc_variadic_fixups(ir_graph *irg, calling_convention_t *cconv); +void sparc_create_stacklayout(ir_graph *irg, calling_convention_t *cconv); +void sparc_fix_stack_bias(ir_graph *irg); + #endif