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
1eca6671
Commit
1eca6671
authored
Apr 18, 2013
by
Matthias Braun
Browse files
ia32: cleanup and use C99 in transform code
parent
0a80a1fb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_common_transform.c
View file @
1eca6671
...
...
@@ -128,12 +128,12 @@ const arch_register_t *ia32_get_clobber_register(const char *clobber)
return
NULL
;
}
int
ia32_mode_needs_gp_reg
(
ir_mode
*
mode
)
bool
ia32_mode_needs_gp_reg
(
ir_mode
*
mode
)
{
if
(
mode
==
ia32_mode_fpcw
)
return
0
;
return
false
;
if
(
get_mode_size_bits
(
mode
)
>
32
)
return
0
;
return
false
;
return
mode_is_int
(
mode
)
||
mode_is_reference
(
mode
)
||
mode
==
mode_b
;
}
...
...
@@ -757,11 +757,11 @@ const arch_register_req_t *ia32_parse_clobber(const char *clobber)
}
int
ia32_prevents_AM
(
ir_node
*
const
block
,
ir_node
*
const
am_candidate
,
ir_node
*
const
other
)
bool
ia32_prevents_AM
(
ir_node
*
const
block
,
ir_node
*
const
am_candidate
,
ir_node
*
const
other
)
{
if
(
get_nodes_block
(
other
)
!=
block
)
return
0
;
return
false
;
if
(
is_Sync
(
other
))
{
int
i
;
...
...
@@ -779,19 +779,19 @@ int ia32_prevents_AM(ir_node *const block, ir_node *const am_candidate,
if
(
!
heights_reachable_in_block
(
ia32_heights
,
pred
,
am_candidate
))
continue
;
return
1
;
return
true
;
}
return
0
;
return
false
;
}
else
{
/* Do not block ourselves from getting eaten */
if
(
is_Proj
(
other
)
&&
get_Proj_pred
(
other
)
==
am_candidate
)
return
0
;
return
false
;
if
(
!
heights_reachable_in_block
(
ia32_heights
,
other
,
am_candidate
))
return
0
;
return
false
;
return
1
;
return
true
;
}
}
...
...
ir/be/ia32/ia32_common_transform.h
View file @
1eca6671
...
...
@@ -16,7 +16,7 @@
#include "bearch_ia32_t.h"
extern
ir_heights_t
*
ia32_heights
;
extern
int
ia32_no_pic_adjust
;
extern
bool
ia32_no_pic_adjust
;
ir_type
*
ia32_get_prim_type
(
const
ir_mode
*
mode
);
...
...
@@ -46,7 +46,7 @@ const arch_register_t *ia32_get_clobber_register(const char *clobber);
/**
* Return true if a mode can be stored in the GP register set.
*/
int
ia32_mode_needs_gp_reg
(
ir_mode
*
mode
);
bool
ia32_mode_needs_gp_reg
(
ir_mode
*
mode
);
/**
* generates code for a ASM node
...
...
@@ -77,8 +77,8 @@ const arch_register_req_t *ia32_parse_clobber(const char *clobber);
/**
* Checks whether other node inputs depend on the am_candidate (via mem-proj).
*/
int
ia32_prevents_AM
(
ir_node
*
const
block
,
ir_node
*
const
am_candidate
,
ir_node
*
const
other
);
bool
ia32_prevents_AM
(
ir_node
*
const
block
,
ir_node
*
const
am_candidate
,
ir_node
*
const
other
);
ir_node
*
ia32_try_create_Immediate
(
ir_node
*
node
,
char
immediate_constraint_type
);
...
...
ir/be/ia32/ia32_transform.c
View file @
1eca6671
This diff is collapsed.
Click to expand it.
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