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
3383b280
Commit
3383b280
authored
May 11, 2011
by
Matthias Braun
Browse files
add support for backend nodes without attributes
parent
6295949a
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/scripts/generate_new_opcodes.pl
View file @
3383b280
...
...
@@ -432,9 +432,12 @@ EOF
}
# lookup init function
my
$attr_init_code
=
$init_attr
{
$attr_type
};
if
(
!
defined
(
$attr_init_code
))
{
die
"
Fatal error: Couldn't find attribute initialisation code for type '
${attr_type}
'
";
my
$attr_init_code
=
"
(void)in;(void)exec_units;(void)flags;(void)in_reqs;(void)n_res;
";
if
(
$attr_type
ne
"")
{
$attr_init_code
=
$init_attr
{
$attr_type
};
if
(
!
defined
(
$attr_init_code
))
{
die
"
Fatal error: Couldn't find attribute initialisation code for type '
${attr_type}
'
";
}
}
my
$custominit
=
"";
if
(
defined
(
$custom_init_attr_func
))
{
...
...
@@ -611,6 +614,8 @@ EOF
push
(
@obst_cmp_attr
,
"
}
\n\n
");
$cmp_attr_func
=
"
cmp_attr_
${op}
";
}
elsif
(
$attr_type
eq
"")
{
$cmp_attr_func
=
"
NULL
";
}
else
{
if
(
defined
(
$compare_attr
{
$
{
attr_type
}}))
{
$cmp_attr_func
=
$compare_attr
{
$
{
attr_type
}};
...
...
@@ -683,9 +688,14 @@ EOF
my
@mapped
=
map
{
"
irop_flag_
$_
"
}
@
{
$n
{"
op_flags
"}};
my
$op_flags
=
join
('
|
',
@mapped
);
my
$attr_size
=
"
0
";
if
(
$attr_type
ne
"")
{
$attr_size
=
"
sizeof(
${attr_type}
)
"
}
$n_opcodes
++
;
$temp
=
"
\t
op_
$op
= new_ir_op(cur_opcode + iro_
$op
,
\"
$op
\"
, op_pin_state_
"
.
$n
{"
state
"}
.
"
,
$op_flags
";
$temp
.=
"
|irop_flag_machine,
"
.
translate_arity
(
$arity
)
.
"
, 0,
sizeof(
${attr_
typ
e}
)
, &ops);
\n
";
$temp
.=
"
|irop_flag_machine,
"
.
translate_arity
(
$arity
)
.
"
, 0,
${attr_
siz
e}
, &ops);
\n
";
push
(
@obst_new_irop
,
$temp
);
push
(
@obst_new_irop
,
"
\t
set_op_tag(op_
$op
,
$arch
\
_op_tag);
\n
");
if
(
defined
(
$default_op_attr_type
))
{
...
...
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