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
63bcb1a3
Commit
63bcb1a3
authored
Sep 09, 2014
by
Tobias Rapp
Browse files
amd64: Floating point register permutation
parent
1c8a3d61
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/amd64/amd64_emitter.c
View file @
63bcb1a3
...
...
@@ -687,9 +687,13 @@ static void emit_be_Perm(const ir_node *node)
arch_register_class_t
const
*
const
cls0
=
reg0
->
reg_class
;
assert
(
cls0
==
reg1
->
reg_class
&&
"Register class mismatch at Perm"
);
amd64_emitf
(
node
,
"xchg %^R, %^R"
,
reg0
,
reg1
);
if
(
cls0
!=
&
amd64_reg_classes
[
CLASS_amd64_gp
])
{
if
(
cls0
==
&
amd64_reg_classes
[
CLASS_amd64_gp
])
{
amd64_emitf
(
node
,
"xchg %^R, %^R"
,
reg0
,
reg1
);
}
else
if
(
cls0
==
&
amd64_reg_classes
[
CLASS_amd64_xmm
])
{
amd64_emitf
(
node
,
"pxor %^R, %^R"
,
reg0
,
reg1
);
amd64_emitf
(
node
,
"pxor %^R, %^R"
,
reg1
,
reg0
);
amd64_emitf
(
node
,
"pxor %^R, %^R"
,
reg0
,
reg1
);
}
else
{
panic
(
"unexpected register class in be_Perm (%+F)"
,
node
);
}
}
...
...
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