summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
880f870)
Also remove the now write-only attribute main_env from struct arch_env_t.
&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 */
&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 */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
true, /* no custom abi handling */
*/
static void TEMPLATE_end_codegeneration(void *self)
{
*/
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();
&amd64_registers[REG_RSP], /* stack pointer register */
&amd64_registers[REG_RBP], /* base pointer register */
3, /* power of two stack alignment for calls, 2^2 == 4 */
&amd64_registers[REG_RSP], /* stack pointer register */
&amd64_registers[REG_RBP], /* base pointer register */
3, /* 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 */
false, /* no custom abi handling */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
false, /* no custom abi handling */
*/
static void amd64_end_codegeneration(void *self)
{
*/
static void amd64_end_codegeneration(void *self)
{
- amd64_isa_t *isa = (amd64_isa_t*)self;
-
- /* emit now all global declarations */
- be_gas_end_compilation_unit(isa->base.main_env);
-
- be_emit_exit();
&arm_registers[REG_SP], /* stack pointer */
&arm_registers[REG_R11], /* base pointer */
2, /* power of two stack alignment for calls, 2^2 == 4 */
&arm_registers[REG_SP], /* stack pointer */
&arm_registers[REG_R11], /* base pointer */
2, /* power of two stack alignment for calls, 2^2 == 4 */
- NULL, /* main environment */
7, /* spill costs */
5, /* reload costs */
true, /* we do have custom abi handling */
7, /* spill costs */
5, /* reload costs */
true, /* we do have custom abi handling */
*/
static void arm_end_codegeneration(void *self)
{
*/
static void arm_end_codegeneration(void *self)
{
- arm_isa_t *isa = (arm_isa_t*)self;
-
- be_gas_end_compilation_unit(isa->base.main_env);
-
- be_emit_exit();
};
/* Initialize the architecture environment struct. */
};
/* Initialize the architecture environment struct. */
-arch_env_t *arch_env_begin_codegeneration(const arch_isa_if_t *isa_if,
- be_main_env_t *main_env)
+arch_env_t *arch_env_begin_codegeneration(const arch_isa_if_t *isa_if)
{
arch_env_t *arch_env = isa_if->begin_codegeneration();
{
arch_env_t *arch_env = isa_if->begin_codegeneration();
- arch_env->main_env = main_env;
/**
* Start codegeneration
*/
/**
* Start codegeneration
*/
-arch_env_t *arch_env_begin_codegeneration(const arch_isa_if_t *isa,
- be_main_env_t *main_env);
+arch_env_t *arch_env_begin_codegeneration(const arch_isa_if_t *isa);
/**
* Register an instruction set architecture
/**
* Register an instruction set architecture
const arch_register_t *sp; /**< The stack pointer register. */
const arch_register_t *bp; /**< The base pointer register. */
int stack_alignment; /**< power of 2 stack alignment */
const arch_register_t *sp; /**< The stack pointer register. */
const arch_register_t *bp; /**< The base pointer register. */
int stack_alignment; /**< power of 2 stack alignment */
- const be_main_env_t *main_env; /**< the be main environment */
int spill_cost; /**< cost for a be_Spill node */
int reload_cost; /**< cost for a be_Reload node */
bool custom_abi : 1; /**< backend does all abi handling
int spill_cost; /**< cost for a be_Spill node */
int reload_cost; /**< cost for a be_Reload node */
bool custom_abi : 1; /**< backend does all abi handling
set_class_final(env->pic_trampolines_type, 1);
memset(asm_constraint_flags, 0, sizeof(asm_constraint_flags));
set_class_final(env->pic_trampolines_type, 1);
memset(asm_constraint_flags, 0, sizeof(asm_constraint_flags));
- env->arch_env = arch_env_begin_codegeneration(isa_if, env);
+ env->arch_env = arch_env_begin_codegeneration(isa_if);
stat_ev_ctx_pop("bemain_irg");
}
stat_ev_ctx_pop("bemain_irg");
}
+ be_gas_end_compilation_unit(&env);
+ be_emit_exit();
+
arch_env_end_codegeneration(arch_env);
be_done_env(&env);
arch_env_end_codegeneration(arch_env);
be_done_env(&env);
&ia32_registers[REG_ESP], /* stack pointer register */
&ia32_registers[REG_EBP], /* base pointer register */
2, /* power of two stack alignment, 2^2 == 4 */
&ia32_registers[REG_ESP], /* stack pointer register */
&ia32_registers[REG_EBP], /* base pointer register */
2, /* power of two stack alignment, 2^2 == 4 */
- NULL, /* main environment */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
false, /* no custom abi handling */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
false, /* no custom abi handling */
static void ia32_end_codegeneration(void *self)
{
ia32_isa_t *isa = (ia32_isa_t*)self;
static void ia32_end_codegeneration(void *self)
{
ia32_isa_t *isa = (ia32_isa_t*)self;
-
- /* emit now all global declarations */
- be_gas_end_compilation_unit(isa->base.main_env);
-
- be_emit_exit();
-
pmap_destroy(isa->tv_ent);
free(self);
}
pmap_destroy(isa->tv_ent);
free(self);
}
&sparc_registers[REG_FRAME_POINTER], /* base pointer register */
3, /* power of two stack alignment
for calls */
&sparc_registers[REG_FRAME_POINTER], /* base pointer register */
3, /* power of two stack alignment
for calls */
- NULL, /* main environment */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
true, /* custom abi handling */
7, /* costs for a spill instruction */
5, /* costs for a reload instruction */
true, /* custom abi handling */
static void sparc_end_codegeneration(void *self)
{
sparc_isa_t *isa = (sparc_isa_t*)self;
static void sparc_end_codegeneration(void *self)
{
sparc_isa_t *isa = (sparc_isa_t*)self;
-
- /* emit now all global declarations */
- be_gas_end_compilation_unit(isa->base.main_env);
-
pmap_destroy(isa->constants);
pmap_destroy(isa->constants);