/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
&arm_gp_regs[REG_R1],
&arm_gp_regs[REG_R2],
&arm_gp_regs[REG_R3],
- &arm_gp_regs[REG_LR]
+ &arm_gp_regs[REG_LR],
+
+ &arm_fpa_regs[REG_F0],
+ &arm_fpa_regs[REG_F1],
+ &arm_fpa_regs[REG_F2],
+ &arm_fpa_regs[REG_F3],
+ &arm_fpa_regs[REG_F4],
+ &arm_fpa_regs[REG_F5],
+ &arm_fpa_regs[REG_F6],
+ &arm_fpa_regs[REG_F7],
};
static const arch_register_t* const param_regs[] = {
&arm_gp_regs[REG_R3]
};
+static const arch_register_t* const float_result_regs[] = {
+ &arm_fpa_regs[REG_F0],
+ &arm_fpa_regs[REG_F1]
+};
+
/** information about a single parameter or result */
typedef struct reg_or_stackslot_t
{
- const arch_register_t *reg0;
- const arch_register_t *reg1;
+ const arch_register_t *reg0; /**< if != NULL, the first register used for this parameter. */
+ const arch_register_t *reg1; /**< if != NULL, the second register used. */
ir_type *type; /**< indicates that an entity of the specific
type is needed */
- int offset;
+ int offset; /**< if transmitted via stack, the offset for this parameter. */
ir_entity *entity; /**< entity in frame type */
} reg_or_stackslot_t;
+/** The calling convention info for one call site. */
typedef struct calling_convention_t
{
- reg_or_stackslot_t *parameters;
- int param_stack_size;
- reg_or_stackslot_t *results;
+ reg_or_stackslot_t *parameters; /**< parameter info. */
+ int param_stack_size; /**< needed stack size for parameters */
+ reg_or_stackslot_t *results; /**< result info. */
} calling_convention_t;
/**
* Decides what goes to register or to stack and what stack offsets/
* datatypes are used.
*/
-calling_convention_t *decide_calling_convention(ir_type *function_type);
+calling_convention_t *arm_decide_calling_convention(ir_type *function_type);
/**
* free memory used by a calling_convention_t
*/
-void free_calling_convention(calling_convention_t *cconv);
+void arm_free_calling_convention(calling_convention_t *cconv);
#endif