Skip to content

Commit

Permalink
Improve ASM formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
benruijl committed Jul 28, 2024
1 parent 4a94ff6 commit a980382
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/evaluate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ impl<T: std::fmt::Display> ExpressionEvaluator<T> {
*out +=
&format!("\t\t\"addpd xmm0, XMMWORD PTR [%0+{}]\\n\\t\"\n", *i * 16);
}
*out += &format!("\t\t\"movapd XMMWORD PTR [%0+{}], xmm0\\n\\t\"", *o * 16,);
*out += &format!("\t\t\"movapd XMMWORD PTR [%0+{}], xmm0\\n\\t\"\n", *o * 16,);
}
Instr::Mul(o, a) => {
if a.len() < 15 {
Expand All @@ -1033,13 +1033,13 @@ impl<T: std::fmt::Display> ExpressionEvaluator<T> {

for i in 1..a.len() {
*out += &format!(
" \"movapd xmm0, xmm1\\n\\t\"
\"unpckhpd xmm0, xmm0\\n\\t\"
\"unpcklpd xmm1, xmm1\\n\\t\"
\"mulpd xmm0, xmm{0}\\n\\t\"
\"mulpd xmm1, xmm{0}\\n\\t\"
\"shufpd xmm0, xmm0, 1\\n\\t\"
\"addsubpd xmm1, xmm0\\n\\t\"\n",
"\t\t\"movapd xmm0, xmm1\\n\\t\"
\t\t\"unpckhpd xmm0, xmm0\\n\\t\"
\t\t\"unpcklpd xmm1, xmm1\\n\\t\"
\t\t\"mulpd xmm0, xmm{0}\\n\\t\"
\t\t\"mulpd xmm1, xmm{0}\\n\\t\"
\t\t\"shufpd xmm0, xmm0, 1\\n\\t\"
\t\t\"addsubpd xmm1, xmm0\\n\\t\"\n",
i + 1
);
}
Expand Down

0 comments on commit a980382

Please sign in to comment.