#include "irtools.h"
#include "irdump.h"
#include "lowering.h"
+#include "lower_dw.h"
#include "bitset.h"
#include "debug.h"
/* fill register allocator interface */
-static const arch_irn_ops_t sparc_irn_ops = {
+const arch_irn_ops_t sparc_irn_ops = {
sparc_classify,
sparc_get_frame_entity,
sparc_set_frame_offset,
be_free_frame_entity_coalescer(fec_env);
irg_block_walk_graph(irg, NULL, sparc_after_ra_walker, NULL);
+
+ sparc_introduce_prolog_epilog(irg);
}
static void sparc_init_graph(ir_graph *irg)
rt_iMod.mem_proj_nr = pn_Mod_M;
rt_iMod.regular_proj_nr = pn_Mod_X_regular;
rt_iMod.exc_proj_nr = pn_Mod_X_except;
- rt_iMod.exc_mem_proj_nr = pn_Mod_M;
rt_iMod.res_proj_nr = pn_Mod_res;
set_entity_visibility(rt_iMod.ent, ir_visibility_external);
rt_uMod.mem_proj_nr = pn_Mod_M;
rt_uMod.regular_proj_nr = pn_Mod_X_regular;
rt_uMod.exc_proj_nr = pn_Mod_X_except;
- rt_uMod.exc_mem_proj_nr = pn_Mod_M;
rt_uMod.res_proj_nr = pn_Mod_res;
set_entity_visibility(rt_uMod.ent, ir_visibility_external);
static arch_env_t *sparc_init(FILE *outfile)
{
sparc_isa_t *isa = XMALLOC(sparc_isa_t);
- memcpy(isa, &sparc_isa_template, sizeof(*isa));
+ *isa = sparc_isa_template;
isa->constants = pmap_create();
be_emit_init(outfile);
NULL, /* find pointer type */
NULL, /* ret_compound_in_regs */
};
-
lower_calls_with_compounds(¶ms);
+ sparc_lower_64bit();
+
for (i = 0; i < n_irgs; ++i) {
ir_graph *irg = get_irp_irg(i);
ir_lower_mode_b(irg, &lower_mode_b_config);
- lower_switch(irg, 256, false);
+ lower_switch(irg, 4, 256, false);
}
}
1, /* big endian */
&arch_dep, /* will be set later */
sparc_is_mux_allowed, /* parameter for if conversion */
+ 32, /* machine size */
NULL, /* float arithmetic mode */
+ 128, /* size of long double */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
NULL, /* no trampoline support: no trampoline builder */
sparc_after_ra,
sparc_finish,
sparc_emit_routine,
+ NULL, /* register_saved_by */
};
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_sparc);
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_sparc)
void be_init_arch_sparc(void)
{
be_register_isa_if("sparc", &sparc_isa_if);