x86_64 generic mpn_mul_1c symbol issue
Amir Aupov
amir.aupov at gmail.com
Fri Feb 21 03:50:39 CET 2025
mpn_mul_1 and mpn_mul_1c in mpn/x86_64/mul_1.asm should be entry points of
one function, not distinct functions.
This confuses downstream binary optimization tool llvm-bolt when it
attempts to inline mpn_mul_1c. The fix is trivial but I can't seem to find
a proper venue to submit it:
```
diff --git a/gmp-6.1.2-generic/mpn/x86_64/mul_1.asm
b/gmp-6.1.2-generic/mpn/x86_64/mul_1.asm
--- a/gmp-6.1.2-generic/mpn/x86_64/mul_1.asm
+++ b/gmp-6.1.2-generic/mpn/x86_64/mul_1.asm
@@ -77,7 +77,6 @@
IFSTD(` mov %r8, %r10')
IFDOS(` mov 64(%rsp), %r10') C 40 + 3*8 (3 push insns)
jmp L(common)
-EPILOGUE()
PROLOGUE(mpn_mul_1)
IFDOS(``push %rsi '')
@@ -180,4 +179,5 @@
IFDOS(``pop %rdi '')
IFDOS(``pop %rsi '')
ret
-EPILOGUE()
+EPILOGUE(mpn_mul_1)
+EPILOGUE(mpn_mul_1c)
```
Thanks,
-Amir
More information about the gmp-bugs
mailing list