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
516482fa
Commit
516482fa
authored
Oct 06, 2006
by
Christian Würdig
Browse files
added support for requirements: different from all in
parent
3d07130b
Changes
1
Show whitespace changes
Inline
Side-by-side
ir/be/scripts/generate_regalloc_if.pl
View file @
516482fa
...
...
@@ -354,7 +354,7 @@ sub build_inout_idx_class {
else
{
my
@regs
=
split
(
/ /
,
$reqs
[
$idx
]);
GET_CLASS:
foreach
my
$reg
(
@regs
)
{
if
(
$reg
=~
/!?(in|out)\_r\d+/
)
{
if
(
$reg
=~
/!?(in|out)\_r\d+/
||
$reg
=~
/!in/
)
{
$class
=
"
UNKNOWN_CLASS
";
}
else
{
...
...
@@ -439,8 +439,14 @@ sub generate_requirements {
push
(
@req_type_mask
,
"
arch_register_req_type_should_be_same
");
}
if
(
defined
(
$different_pos
))
{
if
(
$different_pos
==
666
)
{
push
(
@req_type_mask
,
"
arch_register_req_type_should_be_different_from_all
");
undef
$different_pos
;
}
else
{
push
(
@req_type_mask
,
"
arch_register_req_type_should_be_different
");
}
}
$tmp
.=
"
&_
"
.
$op
.
"
_reg_req_
$inout
\
_
$idx
\n
";
$tmp2
.=
"
{
\n
";
...
...
@@ -543,6 +549,10 @@ CHECK_REQS: foreach (@regs) {
$class
=
$idx_class
[
$
2
-
1
];
next
CHECK_REQS
;
}
elsif
(
/!in/
)
{
$class
=
$idx_class
[
0
];
return
(
$class
,
0
,
undef
,
666
);
}
# check for negate
if
(
substr
(
$_
,
0
,
1
)
eq
"
!
")
{
...
...
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