#include "../be_dbgout.h"
#include "ia32_emitter.h"
+#include "ia32_common_transform.h"
#include "gen_ia32_emitter.h"
#include "gen_ia32_regalloc_if.h"
#include "ia32_nodes_attr.h"
return buf;
}
-/*************************************************************
- * _ _ __ _ _
- * (_) | | / _| | | | |
- * _ __ _ __ _ _ __ | |_| |_ | |__ ___| |_ __ ___ _ __
- * | '_ \| '__| | '_ \| __| _| | '_ \ / _ \ | '_ \ / _ \ '__|
- * | |_) | | | | | | | |_| | | | | | __/ | |_) | __/ |
- * | .__/|_| |_|_| |_|\__|_| |_| |_|\___|_| .__/ \___|_|
- * | | | |
- * |_| |_|
- *************************************************************/
/**
* Emit the name of the 8bit low register
case 128: be_emit_char('t'); return;
}
} else {
- assert(mode_is_int(mode));
+ assert(mode_is_int(mode) || mode_is_reference(mode));
switch (get_mode_size_bits(mode)) {
case 16: be_emit_char('s'); return;
case 32: be_emit_char('l'); return;
ia32_emitf(node, "\tcmov%P %#AR, %#R\n", pnc, in_true, out);
}
-/*********************************************************
- * _ _ _
- * (_) | (_)
- * ___ _ __ ___ _| |_ _ _ _ _ __ ___ _ __ ___
- * / _ \ '_ ` _ \| | __| | | | | | '_ ` _ \| '_ \/ __|
- * | __/ | | | | | | |_ | | |_| | | | | | | |_) \__ \
- * \___|_| |_| |_|_|\__| | |\__,_|_| |_| |_| .__/|___/
- * _/ | | |
- * |__/ |_|
- *********************************************************/
/* jump table entry (target and corresponding number) */
typedef struct _branch_t {
ia32_emitf(NULL, "\n#NO_APP\n");
}
-/**********************************
- * _____ ____
- * / ____| | _ \
- * | | ___ _ __ _ _| |_) |
- * | | / _ \| '_ \| | | | _ <
- * | |___| (_) | |_) | |_| | |_) |
- * \_____\___/| .__/ \__, |____/
- * | | __/ |
- * |_| |___/
- **********************************/
/**
* Emit movsb/w instructions to make mov count divideable by 4
}
-
-/***************************
- * _____
- * / ____|
- * | | ___ _ ____ __
- * | | / _ \| '_ \ \ / /
- * | |___| (_) | | | \ V /
- * \_____\___/|_| |_|\_/
- *
- ***************************/
-
/**
* Emit code for conversions (I, FP), (FP, I) and (FP, FP).
*/
}
-/*******************************************
- * _ _
- * | | | |
- * | |__ ___ _ __ ___ __| | ___ ___
- * | '_ \ / _ \ '_ \ / _ \ / _` |/ _ \/ __|
- * | |_) | __/ | | | (_) | (_| | __/\__ \
- * |_.__/ \___|_| |_|\___/ \__,_|\___||___/
- *
- *******************************************/
-
/**
* Emits code to increase stack pointer.
*/
}
-/***********************************************************************************
- * _ __ _
- * (_) / _| | |
- * _ __ ___ __ _ _ _ __ | |_ _ __ __ _ _ __ ___ _____ _____ _ __| | __
- * | '_ ` _ \ / _` | | '_ \ | _| '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ /
- * | | | | | | (_| | | | | | | | | | | (_| | | | | | | __/\ V V / (_) | | | <
- * |_| |_| |_|\__,_|_|_| |_| |_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_\
- *
- ***********************************************************************************/
-
/**
* Enters the emitter functions for handled nodes into the generic
* pointer of an opcode.
static int should_align_block(const ir_node *block)
{
static const double DELTA = .0001;
- ir_exec_freq *exec_freq = cg->birg->exec_freq;
+ ir_exec_freq *exec_freq = be_get_irg_exec_freq(cg->irg);
ir_node *prev = get_prev_block_sched(block);
double block_freq;
double prev_freq = 0; /**< execfreq of the fallthrough block */
ir_graph *irg = current_ir_graph;
int need_label = block_needs_label(block);
int i, arity;
- ir_exec_freq *exec_freq = cg->birg->exec_freq;
+ ir_exec_freq *exec_freq = be_get_irg_exec_freq(cg->irg);
if (block == get_irg_end_block(irg))
return;
cg = ia32_cg;
isa = cg->isa;
- do_pic = cg->birg->main_env->options->pic;
+ do_pic = be_get_irg_options(cg->irg)->pic;
be_gas_elf_type_char = '@';
get_unique_label(pic_base_label, sizeof(pic_base_label), "PIC_BASE");
- be_dbg_method_begin(entity, be_abi_get_stack_layout(cg->birg->abi));
+ be_dbg_method_begin(entity);
be_gas_emit_function_prolog(entity, ia32_cg_config.function_alignment);
/* we use links to point to target blocks */