Commit a4db20b9 authored by Michael Beck's avatar Michael Beck
Browse files

- removed C99 features

[r26709]
parent f5f01800
......@@ -255,7 +255,7 @@ typedef struct {
static bool try_encode_as_immediate(const ir_node *node, arm_immediate_t *res)
{
unsigned val;
unsigned val, low_pos, high_pos;
if (!is_Const(node))
return false;
......@@ -279,8 +279,8 @@ static bool try_encode_as_immediate(const ir_node *node, arm_immediate_t *res)
If the difference between these 2 is <= 8, then we can encode the value
as immediate.
*/
unsigned low_pos = ntz(val) & ~1u;
unsigned high_pos = (32-nlz(val)+1) & ~1u;
low_pos = ntz(val) & ~1u;
high_pos = (32-nlz(val)+1) & ~1u;
if (high_pos - low_pos <= 8) {
res->imm_8 = val >> low_pos;
......
......@@ -138,7 +138,7 @@ typedef struct reg_pref_t reg_pref_t;
/** per basic-block information */
struct block_info_t {
bool processed; /**< indicate wether block is processed */
bool processed; /**< indicate whether block is processed */
ir_node *assignments[0]; /**< register assignments at end of block */
};
typedef struct block_info_t block_info_t;
......@@ -521,11 +521,11 @@ static void create_congruence_class(ir_node *block, void *data)
int old_node_idx;
ir_node *live;
ir_node *phi;
allocation_info_t *head_info;
allocation_info_t *other_info;
ir_node *op = get_Phi_pred(node, i);
int op_idx = get_irn_idx(op);
op_idx = uf_find(congruence_classes, op_idx);
allocation_info_t *head_info;
allocation_info_t *other_info;
/* do we interfere with the value */
foreach_ir_nodeset(&live_nodes, live, iter) {
......
......@@ -2715,10 +2715,11 @@ BINOP(test, 0x85, 0xA9, 0xF7, 0)
#define BINOPMEM(op, ext) \
static void bemit_##op(const ir_node *node) \
{ \
ir_node *val; \
unsigned size = get_mode_size_bits(get_ia32_ls_mode(node)); \
if (size == 16) \
bemit8(0x66); \
ir_node *val = get_irn_n(node, n_ia32_unary_op); \
val = get_irn_n(node, n_ia32_unary_op); \
if (is_ia32_Immediate(val)) { \
const ia32_immediate_attr_t *attr = get_ia32_immediate_attr_const(val); \
int offset = attr->offset; \
......@@ -2802,10 +2803,11 @@ static void bemit_##op(const ir_node *node) \
\
static void bemit_##op##mem(const ir_node *node) \
{ \
ir_node *count; \
unsigned size = get_mode_size_bits(get_ia32_ls_mode(node)); \
if (size == 16) \
bemit8(0x66); \
ir_node *count = get_irn_n(node, 1); \
count = get_irn_n(node, 1); \
if (is_ia32_Immediate(count)) { \
int offset = get_ia32_immediate_attr_const(count)->offset; \
if (offset == 1) { \
......@@ -2988,8 +2990,8 @@ static void bemit_cmp8bit(const ir_node *node)
}
bemit8(get_ia32_immediate_attr_const(right)->offset);
} else {
bemit8(0x3A);
const arch_register_t *out = get_in_reg(node, n_ia32_Cmp_left);
bemit8(0x3A);
if (get_ia32_op_type(node) == ia32_Normal) {
const arch_register_t *in = get_in_reg(node, n_ia32_Cmp_right);
bemit_modrr(out, in);
......@@ -3017,8 +3019,8 @@ static void bemit_test8bit(const ir_node *node)
}
bemit8(get_ia32_immediate_attr_const(right)->offset);
} else {
bemit8(0x84);
const arch_register_t *out = get_in_reg(node, n_ia32_Test8Bit_left);
bemit8(0x84);
if (get_ia32_op_type(node) == ia32_Normal) {
const arch_register_t *in = get_in_reg(node, n_ia32_Test8Bit_right);
bemit_modrr(out, in);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment