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
490ce7de
Commit
490ce7de
authored
Oct 10, 2006
by
Christian Würdig
Browse files
BugFix: crashed when gen_imm_Sub got SymConst instead of Const (broken tarval)
parent
85b4431f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_transform.c
View file @
490ce7de
...
...
@@ -515,7 +515,7 @@ static ir_node *gen_imm_Add(ia32_transform_env_t *env, ir_node *expr_op, ir_node
DEBUG_ONLY
(
firm_dbg_module_t
*
mod
=
env
->
mod
;)
/* try to optimize to inc/dec */
if
((
env
->
cg
->
opt
&
IA32_OPT_INCDEC
)
&&
(
get_ia32_op_type
(
const_op
)
==
ia32_Const
))
{
if
((
env
->
cg
->
opt
&
IA32_OPT_INCDEC
)
&&
tv
&&
(
get_ia32_op_type
(
const_op
)
==
ia32_Const
))
{
/* optimize tarvals */
class_tv
=
classify_tarval
(
tv
);
class_negtv
=
classify_tarval
(
tarval_neg
(
tv
));
...
...
@@ -839,7 +839,7 @@ static ir_node *gen_imm_Sub(ia32_transform_env_t *env, ir_node *expr_op, ir_node
DEBUG_ONLY
(
firm_dbg_module_t
*
mod
=
env
->
mod
;)
/* try to optimize to inc/dec */
if
((
env
->
cg
->
opt
&
IA32_OPT_INCDEC
)
&&
tv
)
{
if
((
env
->
cg
->
opt
&
IA32_OPT_INCDEC
)
&&
tv
&&
(
get_ia32_op_type
(
const_op
)
==
ia32_Const
)
)
{
/* optimize tarvals */
class_tv
=
classify_tarval
(
tv
);
class_negtv
=
classify_tarval
(
tarval_neg
(
tv
));
...
...
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