From 758b1df7c4cae9424d239319f6c05b216ae80c56 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Thu, 21 Jan 2021 17:37:44 +0900 Subject: [PATCH] tweet a loop --- src/fp_generator.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fp_generator.hpp b/src/fp_generator.hpp index 4b9c120..a5edef1 100644 --- a/src/fp_generator.hpp +++ b/src/fp_generator.hpp @@ -1435,13 +1435,12 @@ private: { const Reg64& a = rax; xor_(c[n + 1], c[n + 1]); // c[n + 1] = 0 - for (int i = 0; i < n - 1; i++) { + for (int i = 0; i < n; i++) { mulx(t0, a, ptr [px + i * 8]); adox(c[i], a); + if (i == n - 1) break; adcx(c[i + 1], t0); } - mulx(t0, a, ptr [px + (n - 1) * 8]); - adox(c[n - 1], a); adox(t0, c[n + 1]); // carry o adcx(c[n], t0); adc(c[n + 1], 0);