Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
a4db20b9
Commit
a4db20b9
authored
Nov 03, 2009
by
Michael Beck
Browse files
- removed C99 features
[r26709]
parent
f5f01800
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/arm/arm_transform.c
View file @
a4db20b9
...
...
@@ -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
;
...
...
ir/be/benewalloc.c
View file @
a4db20b9
...
...
@@ -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 w
h
ether 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
)
{
...
...
ir/be/ia32/ia32_emitter.c
View file @
a4db20b9
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment