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
20d9f785
Commit
20d9f785
authored
Aug 01, 2015
by
Matthias Braun
Browse files
amd64: Transform x87 minus
parent
7316211b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_spec.pl
View file @
20d9f785
...
...
@@ -224,6 +224,15 @@ my $x87const = {
mode
=>
$mode_x87
,
};
my
$x87unop
=
{
irn_flags
=>
[
"
rematerializable
"
],
in_reqs
=>
[
"
x87
"
],
out_reqs
=>
[
"
x87
"
],
ins
=>
[
"
value
"
],
fixed
=>
"
amd64_op_mode_t op_mode = AMD64_OP_X87;
\n
",
mode
=>
$mode_x87
,
};
%nodes
=
(
push_am
=>
{
op_flags
=>
[
"
uses_memory
"
],
...
...
@@ -738,4 +747,9 @@ fld => {
emit
=>
"
fld%FM %AM
",
},
fchs
=>
{
template
=>
$x87unop
,
emit
=>
"
fchs
",
},
);
ir/be/amd64/amd64_transform.c
View file @
20d9f785
...
...
@@ -1331,6 +1331,13 @@ static ir_node *gen_Minus(ir_node *const node)
ir_mode
*
mode
=
get_irn_mode
(
node
);
if
(
mode_is_float
(
mode
))
{
if
(
mode
==
x86_mode_E
)
{
dbg_info
*
dbgi
=
get_irn_dbg_info
(
node
);
ir_node
*
block
=
be_transform_node
(
get_nodes_block
(
node
));
ir_node
*
op
=
get_Minus_op
(
node
);
ir_node
*
new_op
=
be_transform_node
(
op
);
return
new_bd_amd64_fchs
(
dbgi
,
block
,
new_op
);
}
return
gen_float_neg
(
node
);
}
else
{
return
gen_unop
(
node
,
n_Minus_op
,
&
new_bd_amd64_neg
,
pn_amd64_neg_res
);
...
...
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