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
bcc74445
Commit
bcc74445
authored
Nov 14, 2012
by
Christoph Mallon
Browse files
x87: Simplify selecting the instruction and popping the operands in sim_Fucom().
parent
b2541909
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_x87.c
View file @
bcc74445
...
...
@@ -1352,30 +1352,15 @@ static int sim_Fucom(x87_state *state, ir_node *n)
/* patch the operation */
if
(
is_ia32_vFucomFnstsw
(
n
))
{
int
i
;
switch
(
pops
)
{
case
1
:
attr
->
pop
=
true
;
/* FALLTHROUGH */
case
0
:
dst
=
op_ia32_FucomFnstsw
;
break
;
case
2
:
dst
=
op_ia32_FucomppFnstsw
;
break
;
default:
panic
(
"invalid popcount"
);
}
for
(
i
=
0
;
i
<
pops
;
++
i
)
{
dst
=
pops
==
2
?
op_ia32_FucomppFnstsw
:
op_ia32_FucomFnstsw
;
for
(
int
i
=
0
;
i
<
pops
;
++
i
)
x87_pop
(
state
);
}
}
else
if
(
is_ia32_vFucomi
(
n
))
{
dst
=
op_ia32_Fucomi
;
switch
(
pops
)
{
case
0
:
break
;
case
1
:
attr
->
pop
=
true
;
x87_pop
(
state
);
break
;
case
2
:
attr
->
pop
=
true
;
if
(
pops
!=
0
)
x87_pop
(
state
);
if
(
pops
==
2
)
x87_create_fpop
(
state
,
sched_next
(
n
),
1
);
break
;
default:
panic
(
"invalid popcount"
);
}
}
else
{
panic
(
"invalid operation %+F"
,
n
);
}
...
...
@@ -1394,6 +1379,7 @@ static int sim_Fucom(x87_state *state, ir_node *n)
attr
->
x87
[
1
]
=
op2
;
}
attr
->
attr
.
data
.
ins_permuted
=
permuted
;
attr
->
pop
=
pops
!=
0
;
if
(
op2_idx
>=
0
)
{
DB
((
dbg
,
LEVEL_1
,
"<<< %s %s, %s
\n
"
,
get_irn_opname
(
n
),
op1
->
name
,
op2
->
name
));
...
...
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