#include "bitset.h"
#include "debug.h"
-#include "be.h"
+#include "be_t.h"
#include "bearch.h"
#include "benode.h"
#include "belower.h"
TEMPLATE_get_frame_entity,
TEMPLATE_set_frame_offset,
TEMPLATE_get_sp_bias,
- NULL, /* get_inverse */
NULL, /* get_op_estimated_cost */
NULL, /* possible_memory_operand */
NULL, /* perform_memory_operand */
extern const arch_isa_if_t TEMPLATE_isa_if;
static TEMPLATE_isa_t TEMPLATE_isa_template = {
{
- &TEMPLATE_isa_if, /* isa interface implementation */
+ &TEMPLATE_isa_if, /* isa interface implementation */
N_TEMPLATE_REGISTERS,
TEMPLATE_registers,
N_TEMPLATE_CLASSES,
TEMPLATE_reg_classes,
- &TEMPLATE_registers[REG_SP], /* stack pointer register */
- &TEMPLATE_registers[REG_BP], /* base pointer register */
- &TEMPLATE_reg_classes[CLASS_TEMPLATE_gp], /* link pointer register class */
+ &TEMPLATE_registers[REG_SP], /* stack pointer register */
+ &TEMPLATE_registers[REG_BP], /* base pointer register */
2, /* power of two stack alignment for calls, 2^2 == 4 */
- NULL, /* main environment */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
- true, /* no custom abi handling */
+ true, /* custom abi handling */
},
};
TEMPLATE_free_opcodes();
}
-static arch_env_t *TEMPLATE_begin_codegeneration(const be_main_env_t *env)
+static arch_env_t *TEMPLATE_begin_codegeneration(void)
{
TEMPLATE_isa_t *isa = XMALLOC(TEMPLATE_isa_t);
*isa = TEMPLATE_isa_template;
- be_emit_init(env->file_handle);
- be_gas_begin_compilation_unit(env);
-
return &isa->base;
}
*/
static void TEMPLATE_end_codegeneration(void *self)
{
- TEMPLATE_isa_t *isa = (TEMPLATE_isa_t*)self;
-
- /* emit now all global declarations */
- be_gas_end_compilation_unit(isa->base.main_env);
-
- be_emit_exit();
free(self);
}
ir_type *tp;
ir_mode *mode;
int i, n = get_method_n_params(method_type);
- be_abi_call_flags_t call_flags;
/* set abi flags for calls */
- call_flags.bits.call_has_imm = true;
-
- /* set stack parameter passing style */
+ be_abi_call_flags_t call_flags = be_abi_call_get_flags(abi);
+ call_flags.call_has_imm = true;
be_abi_call_set_flags(abi, call_flags, &TEMPLATE_abi_callbacks);
for (i = 0; i < n; i++) {