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
9777242d
Commit
9777242d
authored
Dec 01, 2012
by
Christoph Mallon
Browse files
bescripts: Set be_emit_nothing() as emitter, if the emitter string of a node is empty.
parent
4f6cfa64
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/scripts/generate_emitter.pl
View file @
9777242d
...
...
@@ -48,7 +48,6 @@ my $target_h = $target_dir."/gen_".$arch."_emitter.h";
# stacks for output
my
@obst_func
;
# stack for the emit functions
my
@obst_register
;
# stack for emitter register code
my
$line
;
foreach
my
$op
(
keys
(
%nodes
))
{
...
...
@@ -57,19 +56,14 @@ foreach my $op (keys(%nodes)) {
# skip this node description if no emit information is available
next
if
(
!
defined
(
$n
{"
emit
"}));
$line
=
"
static void emit_
${arch}
_
${op}
(const ir_node *node)
";
push
(
@obst_register
,
"
\t
be_set_emitter(op_
${arch}
_
${op}
, emit_
${arch}
_
${op}
);
\n
");
if
(
$n
{"
emit
"}
eq
"")
{
push
(
@obst_func
,
$line
.
"
\n
");
push
(
@obst_func
,
"
{
\n
");
push
(
@obst_func
,
"
\t
(void) node;
\n
");
push
(
@obst_func
,
"
}
\n\n
");
if
(
$n
{"
emit
"}
eq
"")
{
push
(
@obst_register
,
"
\t
be_set_emitter(op_
${arch}
_
${op}
, be_emit_nothing);
\n
");
next
;
}
push
(
@obst_func
,
$line
.
"
\n
");
push
(
@obst_register
,
"
\t
be_set_emitter(op_
${arch}
_
${op}
, emit_
${arch}
_
${op}
);
\n
");
push
(
@obst_func
,
"
static void emit_
${arch}
_
${op}
(const ir_node *node)
\n
");
push
(
@obst_func
,
"
{
\n
");
my
@emit
=
split
(
/\n/
,
$n
{"
emit
"});
...
...
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