return;
ent = get_SymConst_entity(symconst);
- r = (const i_call_record*)pmap_get(wenv->c_map, ent);
+ r = pmap_get(i_call_record const, wenv->c_map, ent);
if (r != NULL) {
wenv->nr_of_intrinsics += r->i_mapper(node, r->ctx) ? 1 : 0;
set_irg_callee_info_state(irg, irg_callee_info_inconsistent);
/* Exception control flow might have changed / new block might have added. */
- clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_DOMINANCE);
+ clear_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE);
/* verify here */
irg_verify(irg, VERIFY_NORMAL);
dbg = get_irn_dbg_info(call);
if (irn == NULL) {
- ir_mode *mode = get_irn_mode(left);
+ ir_mode *result_mode = get_irn_mode(left);
ir_node *div;
+ ir_mode *mode = result_mode;
+ ir_mode *float_arithmetic = be_get_backend_param()->mode_float_arithmetic;
+ if (float_arithmetic != NULL) {
+ left = new_r_Conv(block, left, float_arithmetic);
+ mode = float_arithmetic;
+ }
+
irn = new_r_Const(irg, get_mode_one(mode));
div = new_rd_Div(dbg, block, mem, irn, left, mode, op_pin_state_pinned);
mem = new_r_Proj(div, mode_M, pn_Div_M);
exc_jmp = new_r_Proj(div, mode_X, pn_Div_X_except);
ir_set_throws_exception(div, true);
}
+ if (result_mode != mode) {
+ irn = new_r_Conv(block, irn, result_mode);
+ }
}
DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_POW);
replace_call(irn, call, mem, reg_jmp, exc_jmp);
ir_node *val = get_Call_param(call, 0);
(void) ctx;
- if (is_strictConv(val)) {
+ if (is_Conv(val)) {
ir_node *op = get_Conv_op(val);
if (is_Minus(op)) {
/* f(-x) = f(x) with strictConv */
op = get_Minus_op(op);
val = new_rd_Conv(dbg, block, op, mode);
- if (is_Conv(val)) {
- /* still a Conv ? */
- set_Conv_strict(val, 1);
- }
DBG_OPT_ALGSIM2(call, op, call, FS_OPT_RTS_SYMMETRIC);
set_Call_param(call, 0, val);
changed = 1;
if (!mode_is_int(mode) || get_mode_size_bits(mode) != 8)
return NULL;
- if (!has_entity_initializer(ent)) {
- size_t i, n;
-
- n = get_compound_ent_n_values(ent);
- for (i = 0; i < n; ++i) {
- ir_node *irn = get_compound_ent_value(ent, i);
-
- if (! is_Const(irn))
- return NULL;
-
- if (is_Const_null(irn)) {
- /* found the length */
- ir_tarval *tv = new_tarval_from_long(i, get_type_mode(res_tp));
- return new_r_Const(irg, tv);
- }
- }
- return NULL;
- }
-
initializer = get_entity_initializer(ent);
if (get_initializer_kind(initializer) != IR_INITIALIZER_COMPOUND)
return NULL;
if (!mode_is_int(mode) || get_mode_size_bits(mode) != 8)
return NULL;
- if (!has_entity_initializer(left) && !has_entity_initializer(right)) {
- /* code that uses deprecated compound_graph_path stuff */
- size_t n = get_compound_ent_n_values(left);
- size_t n_r = get_compound_ent_n_values(right);
- size_t i;
- int res = 0;
-
- if (n_r < n)
- n = n_r;
- for (i = 0; i < n; ++i) {
- ir_node *irn;
- long v_l, v_r;
- ir_tarval *tv;
-
- irn = get_compound_ent_value(left, i);
- if (! is_Const(irn))
- return NULL;
- tv = get_Const_tarval(irn);
- v_l = get_tarval_long(tv);
-
- irn = get_compound_ent_value(right, i);
- if (! is_Const(irn))
- return NULL;
- tv = get_Const_tarval(irn);
- v_r = get_tarval_long(tv);
-
- if (v_l < v_r) {
- res = -1;
- break;
- }
- if (v_l > v_r) {
- res = +1;
- break;
- }
-
- if (v_l == 0) {
- res = 0;
- break;
- }
- }
- if (i < n) {
- /* we found an end */
- ir_tarval *tv = new_tarval_from_long(res, get_type_mode(res_tp));
- return new_r_Const(irg, tv);
- }
- return NULL;
- }
-
init_l = get_entity_initializer(left);
init_r = get_entity_initializer(right);
if (get_initializer_kind(init_l) != IR_INITIALIZER_COMPOUND ||
{
ir_type *tp = get_entity_type(ent);
ir_mode *mode;
- ir_node *irn;
ir_initializer_t *initializer;
ir_initializer_t *init0;
if (!mode_is_int(mode) || get_mode_size_bits(mode) != 8)
return 0;
- if (!has_entity_initializer(ent)) {
- /* code for deprecated compound_graph_path stuff */
- size_t n = get_compound_ent_n_values(ent);
- if (n < 1)
- return 0;
- irn = get_compound_ent_value(ent, 0);
-
- return is_Const(irn) && is_Const_null(irn);
- }
-
initializer = get_entity_initializer(ent);
if (get_initializer_kind(initializer) != IR_INITIALIZER_COMPOUND)
return 0;