* hash a pointer value: Pointer addresses are mostly aligned to 4
* or 8 bytes. So we remove the lowest 3 bits
*/
-#define HASH_PTR(ptr) (((char *) (ptr) - (char *)0) >> 3)
+#define HASH_PTR(ptr) ((unsigned)(((char *) (ptr) - (char *)0) >> 3))
/**
* Hash a string.
*/
ptr_access_kind get_method_param_access(ir_entity *ent, int pos)
{
- ir_type *mtp = get_entity_type(ent);
#ifndef NDEBUG
+ ir_type *mtp = get_entity_type(ent);
int is_variadic = get_method_variadicity(mtp) == variadicity_variadic;
assert(0 <= pos && (is_variadic || pos < get_method_n_params(mtp)));
*/
float get_method_param_weight(ir_entity *ent, int pos)
{
- ir_type *mtp = get_entity_type(ent);
-
#ifndef NDEBUG
+ ir_type *mtp = get_entity_type(ent);
int is_variadic = get_method_variadicity(mtp) == variadicity_variadic;
assert(0 <= pos && (is_variadic || pos < get_method_n_params(mtp)));
#endif
If Sel follow to outermost of compound. */
static ir_entity *get_addr_entity(ir_node *addr, int pos) {
ir_entity *ent;
+ (void) pos;
switch (get_irn_opcode(addr)) {
case iro_Sel:
seq[i].costs = INT_MAX;
}
+ (void) ci;
assert(is_color_admissible(env, ci, col));
seq[col].col = 0;
seq[0].col = col;
} local_env_t;
static void build_coloring_cstr(ilp_env_t *ienv) {
- local_env_t *lenv = ienv->env;
be_ifg_t *ifg = ienv->co->cenv->ifg;
void *iter = be_ifg_nodes_iter_alloca(ifg);
bitset_t *colors;
assert(ws->len < env->n_regs && "Workset already full!");
ws->vals[ws->len].irn = val;
ws->vals[ws->len].reloaded_value = reloaded_value;
+ ws->vals[ws->len].time = 6666;
ws->len++;
}
static INLINE unsigned get_distance(belady_env_t *env, ir_node *from, unsigned from_step, const ir_node *def, int skip_from_uses)
{
be_next_use_t use;
- int flags = arch_irn_get_flags(env->arch, def);
+ int flags = arch_irn_get_flags(env->arch, def);
+ unsigned time;
assert(! (flags & arch_irn_flags_ignore));
if(flags & arch_irn_flags_dont_spill)
return 0;
+ time = use.time;
+ time += be_get_reload_costs_no_weight(env->senv, def, use.before) * 10;
+
return use.time;
}
assert(is_usage);
}
}
- //DBG((dbg, DBG_DECIDE, " demand = %d\n", demand));
/*
2. Make room for at least 'demand' slots
for (i = max_allowed; i < ws->len; ++i) {
ir_node *irn = ws->vals[i].irn;
- DBG((dbg, DBG_DECIDE, " disposing %+F (%u)\n", irn,
+ DBG((dbg, DBG_DECIDE, " disposing node %+F (%u)\n", irn,
workset_get_time(ws, i)));
if(!USES_IS_INFINITE(ws->vals[i].time)
&& !ws->vals[i].reloaded_value) {
-// be_add_spill(env->senv, irn, env->instr);
+ //be_add_spill(env->senv, irn, env->instr);
}
if (is_Phi(irn))
static void belady(ir_node *block, void *env);
-/** Decides whether a specific node should be in the start workset or not
+/**
+ * Decides whether a specific node should be in the start workset or not
*
* @param env belady environment
* @param first
be_next_use_t next_use;
loc_t loc;
loc.time = USES_INFINITY;
- loc.irn = node;
+ loc.irn = node;
loc.reloaded_value = 0;
(void) block;
break;
loc = to_take_or_not_to_take(env, first, irn, block, loop);
+ /* the phis can't be reloaded here (they just get defined) */
+ loc.reloaded_value = 0;
if (! USES_IS_INFINITE(loc.time)) {
if (USES_IS_PENDING(loc.time))
* workset */
}
+#if 0
if(!found && be_is_live_out(env->lv, pred, node)
&& !workset_pred_end->vals[iter].reloaded_value) {
ir_node *insert_point
= be_get_end_of_block_insertion_point(pred);
DBG((dbg, DBG_SPILL, "Spill %+F before %+F\n", node,
insert_point));
-// be_add_spill(env->senv, node, insert_point);
+ be_add_spill(env->senv, node, insert_point);
}
+#endif
}
/* reload missing values in predecessors */
ir_graph *irg = get_irn_irg(block);
ir_node *startblock = get_irg_start_block(irg);
+ result.before = NULL;
outermost_loop = loopdepth;
foreach_block_succ(block, edge) {
const be_use_t *use;
NULL, /* types */
NULL, /* tv_ents */
NULL, /* current code generator */
+ NULL, /* abstract machine */
#ifndef NDEBUG
NULL, /* name obstack */
- 0 /* name obst size */
#endif
};
ir_graph *irg = current_ir_graph;
ir_node *block = get_nodes_block(node);
ir_node *new_block = be_transform_node(block);
- ir_mode *mode = get_irn_mode(node);
ir_node *new_op1;
ir_node *new_op2;
ir_node *new_node;
- assert(! mode_is_float(mode));
+ assert(! mode_is_float(get_irn_mode(node)));
assert(flags & match_immediate);
assert((flags & ~(match_mode_neutral | match_immediate)) == 0);
ia32_address_mode_t am;
ia32_address_t *addr = &am.addr;
+ (void) node;
if (src_bits < tgt_bits) {
smaller_mode = src_mode;
smaller_bits = src_bits;
}
void ppc32_emit_rlwimi_helper(const ir_node *n) {
- rlwimi_const_t *rlwimi_const = get_ppc32_rlwimi_const(n);
+ const rlwimi_const_t *rlwimi_const = get_ppc32_rlwimi_const(n);
be_emit_irprintf("%i, %i, %i", rlwimi_const->shift,
rlwimi_const->maskA, rlwimi_const->maskB);
* |___/
***************************************************************************************************/
-/**
- * Wraps get_irn_generic_attr() as it takes no const ir_node, so we need to do a cast.
- * Firm was made by people hating const :-(
- */
-ppc32_attr_t *get_ppc32_attr(const ir_node *node) {
+ppc32_attr_t *get_ppc32_attr(ir_node *node) {
assert(is_ppc32_irn(node) && "need ppc node to get attributes");
- return (ppc32_attr_t *)get_irn_generic_attr((ir_node *)node);
+ return (ppc32_attr_t *)get_irn_generic_attr(node);
}
+const ppc32_attr_t *get_ppc32_attr_const(const ir_node *node) {
+ assert(is_ppc32_irn(node) && "need ppc node to get attributes");
+ return (const ppc32_attr_t *)get_irn_generic_attr_const(node);
+}
+
+
+
/**
* Returns the argument register requirements of a ppc node.
*/
const arch_register_req_t **get_ppc32_in_req_all(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->in_req;
}
* Returns the result register requirements of an ppc node.
*/
const arch_register_req_t **get_ppc32_out_req_all(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->out_req;
}
* Returns the argument register requirement at position pos of an ppc node.
*/
const arch_register_req_t *get_ppc32_in_req(const ir_node *node, int pos) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->in_req[pos];
}
* Returns the result register requirement at position pos of an ppc node.
*/
const arch_register_req_t *get_ppc32_out_req(const ir_node *node, int pos) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->out_req[pos];
}
* Returns the register flag of an ppc node.
*/
arch_irn_flags_t get_ppc32_flags(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->flags;
}
/**
* Sets the register flag of an ppc node.
*/
-void set_ppc32_flags(const ir_node *node, arch_irn_flags_t flags) {
+void set_ppc32_flags(ir_node *node, arch_irn_flags_t flags) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->flags = flags;
}
* Returns the result register slots of an ppc node.
*/
const arch_register_t **get_ppc32_slots(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->slots;
}
* Returns the name of the OUT register at position pos.
*/
const char *get_ppc32_out_reg_name(const ir_node *node, int pos) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
assert(is_ppc32_irn(node) && "Not an ppc node.");
assert(pos < ARR_LEN(attr->slots) && "Invalid OUT position.");
* Returns the index of the OUT register at position pos within its register class.
*/
int get_ppc32_out_regnr(const ir_node *node, int pos) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
assert(is_ppc32_irn(node) && "Not an ppc node.");
assert(pos < ARR_LEN(attr->slots) && "Invalid OUT position.");
* Returns the OUT register at position pos.
*/
const arch_register_t *get_ppc32_out_reg(const ir_node *node, int pos) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
assert(is_ppc32_irn(node) && "Not an ppc node.");
assert(pos < ARR_LEN(attr->slots) && "Invalid OUT position.");
* Returns the number of results.
*/
int get_ppc32_n_res(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return ARR_LEN(attr->slots);
}
* Returns the type of the content (if any)
*/
ppc32_attr_content_type get_ppc32_type(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->content_type;
}
/**
* Sets a tarval type content (also updating the content_type)
*/
-void set_ppc32_constant_tarval(const ir_node *node, tarval *const_tarval) {
+void set_ppc32_constant_tarval(ir_node *node, tarval *const_tarval) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_Const;
attr->data.constant_tarval = const_tarval;
* Returns a tarval type constant
*/
tarval *get_ppc32_constant_tarval(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->data.constant_tarval;
}
/**
* Sets an ident type constant (also updating the content_type)
*/
-void set_ppc32_symconst_ident(const ir_node *node, ident *symconst_ident) {
+void set_ppc32_symconst_ident(ir_node *node, ident *symconst_ident) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_SymConst;
attr->data.symconst_ident = symconst_ident;
* Returns an ident type constant
*/
ident *get_ppc32_symconst_ident(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->data.symconst_ident;
}
/**
* Sets an entity (also updating the content_type)
*/
-void set_ppc32_frame_entity(const ir_node *node, ir_entity *ent) {
+void set_ppc32_frame_entity(ir_node *node, ir_entity *ent) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_FrameEntity;
attr->data.frame_entity = ent;
* Returns an entity
*/
ir_entity *get_ppc32_frame_entity(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->data.frame_entity;
}
/**
* Sets a Rlwimi const (also updating the content_type)
*/
-void set_ppc32_rlwimi_const(const ir_node *node, unsigned shift, unsigned maskA, unsigned maskB) {
+void set_ppc32_rlwimi_const(ir_node *node, unsigned shift, unsigned maskA, unsigned maskB) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_RlwimiConst;
attr->data.rlwimi_const.shift = shift;
/**
* Returns the rlwimi const structure
*/
-rlwimi_const_t *get_ppc32_rlwimi_const(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+const rlwimi_const_t *get_ppc32_rlwimi_const(const ir_node *node) {
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return &attr->data.rlwimi_const;
}
/**
* Sets a Proj number (also updating the content_type)
*/
-void set_ppc32_proj_nr(const ir_node *node, int proj_nr) {
+void set_ppc32_proj_nr(ir_node *node, int proj_nr) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_BranchProj;
attr->data.proj_nr = proj_nr;
* Returns the proj number
*/
int get_ppc32_proj_nr(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->data.proj_nr;
}
/**
* Sets an offset for a memory access (also updating the content_type)
*/
-void set_ppc32_offset(const ir_node *node, int offset) {
+void set_ppc32_offset(ir_node *node, int offset) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_Offset;
attr->data.offset = offset;
* Returns the offset
*/
int get_ppc32_offset(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->data.offset;
}
/**
* Sets the offset mode (ppc32_ao_None, ppc32_ao_Lo16, ppc32_ao_Hi16 or ppc32_ao_Ha16)
*/
-void set_ppc32_offset_mode(const ir_node *node, ppc32_attr_offset_mode mode) {
+void set_ppc32_offset_mode(ir_node *node, ppc32_attr_offset_mode mode) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->offset_mode = mode;
}
* Returns the offset mode
*/
ppc32_attr_offset_mode get_ppc32_offset_mode(const ir_node *node) {
- ppc32_attr_t *attr = get_ppc32_attr(node);
+ const ppc32_attr_t *attr = get_ppc32_attr_const(node);
return attr->offset_mode;
}
/**
* Returns the attributes of an ppc node.
*/
-ppc32_attr_t *get_ppc32_attr(const ir_node *node);
+ppc32_attr_t *get_ppc32_attr(ir_node *node);
+const ppc32_attr_t *get_ppc32_attr_const(const ir_node *node);
/**
* Returns the argument register requirements of an ppc node.
/**
* Sets the register flag of an ppc node.
*/
-void set_ppc32_flags(const ir_node *node, arch_irn_flags_t flags);
+void set_ppc32_flags(ir_node *node, arch_irn_flags_t flags);
/**
* Returns the result register slots of an ppc node.
ppc32_attr_content_type get_ppc32_type(const ir_node *node);
-void set_ppc32_constant_tarval(const ir_node *node, tarval *const_tarval);
+void set_ppc32_constant_tarval(ir_node *node, tarval *const_tarval);
tarval *get_ppc32_constant_tarval(const ir_node *node);
-void set_ppc32_symconst_ident(const ir_node *node, ident *symconst_ident);
+void set_ppc32_symconst_ident(ir_node *node, ident *symconst_ident);
ident *get_ppc32_symconst_ident(const ir_node *node);
-void set_ppc32_frame_entity(const ir_node *node, ir_entity *ent);
+void set_ppc32_frame_entity(ir_node *node, ir_entity *ent);
ir_entity *get_ppc32_frame_entity(const ir_node *node);
-void set_ppc32_rlwimi_const(const ir_node *node, unsigned shift, unsigned maskA, unsigned maskB);
-rlwimi_const_t *get_ppc32_rlwimi_const(const ir_node *node);
+void set_ppc32_rlwimi_const(ir_node *node, unsigned shift, unsigned maskA, unsigned maskB);
+const rlwimi_const_t *get_ppc32_rlwimi_const(const ir_node *node);
-void set_ppc32_proj_nr(const ir_node *node, int proj_nr);
+void set_ppc32_proj_nr(ir_node *node, int proj_nr);
int get_ppc32_proj_nr(const ir_node *node);
-void set_ppc32_offset(const ir_node *node, int offset);
+void set_ppc32_offset(ir_node *node, int offset);
int get_ppc32_offset(const ir_node *node);
-void set_ppc32_offset_mode(const ir_node *node, ppc32_attr_offset_mode mode);
+void set_ppc32_offset_mode(ir_node *node, ppc32_attr_offset_mode mode);
ppc32_attr_offset_mode get_ppc32_offset_mode(const ir_node *node);
void ppc32_register_additional_opcodes(int opcode_num);
tarval *tv_const = get_ppc32_constant_tarval(op2);
int sh = get_tarval_long(tv_const);
assert(0<=sh && sh<=31);
+ (void) sh;
set_ppc32_constant_tarval(shift, tv_const);
set_ppc32_offset_mode(shift, ppc32_ao_None);
return shift;
ppc32_code_gen_t *cg = (ppc32_code_gen_t *)env;
ir_op *op = get_irn_op(node);
ir_node *asm_node = NULL;
+ (void) cg;
if (op == op_Block)
return;
ppc32_code_gen_t *cgenv = (ppc32_code_gen_t *)env;
ir_node *asm_node = NULL;
ppc32_transform_env_t tenv;
+ (void) cgenv;
if (is_Block(node))
return;
#else /* DEBUG_libfirm */
/* some picky compiler don't allow empty files */
-static int dummy;
+static int __attribute__((unused)) dummy;
#endif /* DEBUG_libfirm */
#else
/* some picky compiler do not allow empty files */
-static int _firm_only_that_you_can_compile_with_NDEBUG_defined;
+static int __attribute__((unused)) _firm_only_that_you_can_compile_with_NDEBUG_defined;
#endif /* NDEBUG */
}
} break;
case iro_Const: {
- ir_type *tp = get_Const_type(n);
- assert(tp != firm_none_type);
+ assert(get_Const_type(n) != firm_none_type);
fprintf(F, " Const of type %s \n", get_type_name_ex(get_Const_type(n), &bad));
} break;
case iro_SymConst: {
ir_node *nn, *block;
int new_arity;
ir_op *op = get_irn_op(n);
+ (void) env;
/* The end node looses it's flexible in array. This doesn't matter,
as dead node elimination builds End by hand, inlineing doesn't use
optimize_graph_df(irg);
optimize_cf(irg);
}
- if (env->got_inline || (env->n_callers_orig != env->n_callers))
+ if (env->got_inline || (env->n_callers_orig != env->n_callers)) {
DB((dbg, SET_LEVEL_1, "Nodes:%3d ->%3d, calls:%3d ->%3d, callers:%3d ->%3d, -- %s\n",
env->n_nodes_orig, env->n_nodes, env->n_call_nodes_orig, env->n_call_nodes,
env->n_callers_orig, env->n_callers,
get_entity_name(get_irg_entity(irg))));
+ }
}
obstack_free(&obst, NULL);
int is_Cast_upcast(ir_node *node) {
ir_type *totype = get_Cast_type(node);
ir_type *fromtype = get_irn_typeinfo_type(get_Cast_op(node));
- ir_graph *myirg = get_irn_irg(node);
- assert(get_irg_typeinfo_state(myirg) == ir_typeinfo_consistent);
+ assert(get_irg_typeinfo_state(get_irn_irg(node)) == ir_typeinfo_consistent);
assert(fromtype);
while (is_Pointer_type(totype) && is_Pointer_type(fromtype)) {
/* Psi support */
ir_node *get_Psi_cond(ir_node *node, int pos) {
- int num_conds = get_Psi_n_conds(node);
assert(node->op == op_Psi);
- assert(pos < num_conds);
+ assert(pos < get_Psi_n_conds(node));
return get_irn_n(node, 2 * pos);
}
void set_Psi_cond(ir_node *node, int pos, ir_node *cond) {
- int num_conds = get_Psi_n_conds(node);
assert(node->op == op_Psi);
- assert(pos < num_conds);
+ assert(pos < get_Psi_n_conds(node));
set_irn_n(node, 2 * pos, cond);
}
ir_node *get_Psi_val(ir_node *node, int pos) {
- int num_vals = get_Psi_n_conds(node);
assert(node->op == op_Psi);
- assert(pos < num_vals);
+ assert(pos < get_Psi_n_conds(node));
return get_irn_n(node, 2 * pos + 1);
}
void set_Psi_val(ir_node *node, int pos, ir_node *val) {
- int num_vals = get_Psi_n_conds(node);
assert(node->op == op_Psi);
- assert(pos < num_vals);
+ assert(pos < get_Psi_n_conds(node));
set_irn_n(node, 2 * pos + 1, val);
}
}
#else /* DEBUG_libfirm */
-void dump_irn(ir_node *n) {}
+void dump_irn(ir_node *n) { (void) n; }
#endif /* DEBUG_libfirm */
ir_node *b_left = get_binop_left(b);
ir_node *b_right = get_binop_right(b);
ir_node *c = NULL;
- ir_node *op1, *op2;
+ ir_node *op1 = NULL;
+ ir_node *op2 = NULL;
if (is_op_commutative(op)) {
if (a_left == b_left) {
vrfy_entities = enable;
}
+#ifndef NDEBUG
+
/**
* little helper for NULL modes
*/
get_irn_node_nr(block), get_irn_arity(block));
}
+#endif /* #ifndef NDEBUG */
+
/** If the address is Sel or SymConst, return the entity. */
static ir_entity *get_ptr_entity(ir_node *ptr) {
if (get_irn_op(ptr) == op_Sel) {
node might depend on that. */
copy_node_attr(node, nn);
res = node_add(env->trans_set, nn);
- if (nn != res)
+ if (nn != res) {
obstack_free(env->obst, nn);
- else
+ } else {
DB((dbg, LEVEL_2, "--> Translate %+F in <%+F,%d> into %+F\n", node, block, pos, res));
+ }
+
return res;
}
return node;
value_set_foreach(entry, idom_info->new_set) {
updated |= value_add_or_replace(curr_info->avail_out, entry->node, entry->value);
}
- if (updated)
+ if (updated) {
dump_value_set(curr_info->avail_out, "Updated [Avail_out]", block);
+ }
if (arity <= 1)
return;
#include "irprintf.h"
#include "irgwalk.h"
-static const char *firm_vrfy_failure_msg;
#ifdef NDEBUG
/*
#endif /* NDEBUG */
+#ifndef NDEBUG
+
+static const char *firm_vrfy_failure_msg;
+
/**
* Show diagnostic if an entity overwrites another one not
* in direct superclasses.
}
}
+/**
+ * Shows a wrong entity allocation
+ */
+static void show_ent_alloc_error(ir_entity *ent) {
+ ir_fprintf(stderr, "%+e owner %t has allocation %s\n",
+ ent, get_entity_type(ent),
+ get_allocation_name(get_entity_allocation(ent)));
+}
+
+#endif /* #ifndef NDEBUG */
+
/**
* Check a class
*/
return 0;
}
-/**
- * Shows a wrong entity allocation
- */
-static void show_ent_alloc_error(ir_entity *ent) {
- ir_fprintf(stderr, "%+e owner %t has allocation %s\n",
- ent, get_entity_type(ent),
- get_allocation_name(get_entity_allocation(ent)));
-}
-
/*
* Check an entity. Currently, we check only if initialized constants
* are build on the const irg graph.
fp_value *fc_rnd(const fp_value *a, fp_value *result) {
if (result == NULL) result = calc_buffer;
+ (void) a;
TRACEPRINTF(("%s ", fc_print(a, buffer, sizeof(buffer), FC_PACKED)));
TRACEPRINTF(("rounded to integer "));
assert(0);
break;
}
- if (! fc_flt2int(res, sc_get_buffer(), dst_mode))
+ buffer = alloca(sc_get_buffer_length());
+ if (! fc_flt2int(res, buffer, dst_mode))
return tarval_bad;
- return get_tarval(sc_get_buffer(), sc_get_buffer_length(), dst_mode);
+ return get_tarval(buffer, sc_get_buffer_length(), dst_mode);
default:
/* the rest can't be converted */