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
a7cd5534
Commit
a7cd5534
authored
Dec 04, 2012
by
Christoph Mallon
Browse files
irdump: Remove the parameter bad from get_mode_name_ex().
All callers pass in a null pointer.
parent
1b4cac34
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/ir/irdump.c
View file @
a7cd5534
...
...
@@ -295,12 +295,10 @@ int ir_should_dump(const char *name)
/* -------------- some extended helper functions ----------------- */
const
char
*
get_mode_name_ex
(
const
ir_mode
*
mode
,
int
*
bad
)
char
const
*
get_mode_name_ex
(
ir_mode
const
*
const
mode
)
{
if
(
is_mode
(
mode
))
return
get_mode_name
(
mode
);
if
(
bad
!=
NULL
)
*
bad
|=
1
;
return
"<ERROR>"
;
}
...
...
@@ -762,7 +760,7 @@ void dump_node_opcode(FILE *F, const ir_node *n)
case
iro_Load
:
if
(
get_Load_unaligned
(
n
)
==
align_non_aligned
)
fprintf
(
F
,
"ua"
);
fprintf
(
F
,
"%s[%s]"
,
get_irn_opname
(
n
),
get_mode_name_ex
(
get_Load_mode
(
n
)
,
NULL
));
fprintf
(
F
,
"%s[%s]"
,
get_irn_opname
(
n
),
get_mode_name_ex
(
get_Load_mode
(
n
)));
break
;
case
iro_Store
:
if
(
get_Store_unaligned
(
n
)
==
align_non_aligned
)
...
...
@@ -781,10 +779,10 @@ void dump_node_opcode(FILE *F, const ir_node *n)
fprintf
(
F
,
"%s"
,
get_irn_opname
(
n
));
if
(
get_Div_no_remainder
(
n
))
fprintf
(
F
,
"RL"
);
fprintf
(
F
,
"[%s]"
,
get_mode_name_ex
(
get_Div_resmode
(
n
)
,
NULL
));
fprintf
(
F
,
"[%s]"
,
get_mode_name_ex
(
get_Div_resmode
(
n
)));
break
;
case
iro_Mod
:
fprintf
(
F
,
"%s[%s]"
,
get_irn_opname
(
n
),
get_mode_name_ex
(
get_Mod_resmode
(
n
)
,
NULL
));
fprintf
(
F
,
"%s[%s]"
,
get_irn_opname
(
n
),
get_mode_name_ex
(
get_Mod_resmode
(
n
)));
break
;
case
iro_Builtin
:
fprintf
(
F
,
"%s[%s]"
,
get_irn_opname
(
n
),
get_builtin_kind_name
(
get_Builtin_kind
(
n
)));
...
...
@@ -828,7 +826,7 @@ static void dump_node_mode(FILE *F, const ir_node *n)
if
(
mode
!=
NULL
&&
mode
!=
mode_BB
&&
mode
!=
mode_ANY
&&
mode
!=
mode_BAD
&&
(
mode
!=
mode_T
||
iro
==
iro_Proj
))
fprintf
(
F
,
"%s"
,
get_mode_name_ex
(
mode
,
NULL
));
fprintf
(
F
,
"%s"
,
get_mode_name_ex
(
mode
));
}
}
...
...
ir/ir/irdump_t.h
View file @
a7cd5534
...
...
@@ -39,9 +39,8 @@ const char *get_ent_dump_name(const ir_entity *ent);
/**
* returns the name of a mode or "<ERROR>" if mode is NOT a mode object.
* in the later case, sets bad.
*/
c
onst
char
*
get_mode_name_ex
(
const
ir_mode
*
mode
,
int
*
bad
);
c
har
const
*
get_mode_name_ex
(
ir_mode
const
*
mode
);
/** dump the name of a node n to the File F. */
void
dump_node_opcode
(
FILE
*
out
,
const
ir_node
*
n
);
...
...
ir/ir/irdumptxt.c
View file @
a7cd5534
...
...
@@ -266,7 +266,7 @@ void dump_irnode_to_file(FILE *F, const ir_node *n)
}
}
break
;
case
iro_Load
:
fprintf
(
F
,
" mode of loaded value: %s
\n
"
,
get_mode_name_ex
(
get_Load_mode
(
n
)
,
NULL
));
fprintf
(
F
,
" mode of loaded value: %s
\n
"
,
get_mode_name_ex
(
get_Load_mode
(
n
)));
fprintf
(
F
,
" volatility: %s
\n
"
,
get_volatility_name
(
get_Load_volatility
(
n
)));
fprintf
(
F
,
" align: %s
\n
"
,
get_align_name
(
get_Load_unaligned
(
n
)));
break
;
...
...
Write
Preview
Supports
Markdown
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