You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.3 KiB

  1. From 7f328b93ee2aa8bb4e94613b6ed218e7525d8dc0 Mon Sep 17 00:00:00 2001
  2. From: David Seifert <soap@gentoo.org>
  3. Date: Sat, 10 Jul 2021 13:06:57 +0200
  4. Subject: [PATCH] Do not force inlining of indirect functions
  5. * A function called indirectly cannot be decorated
  6. with `__attribute((always_inline))`, as this is
  7. guaranteed to only work with direct calls:
  8. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63220#c1
  9. Bug: https://bugs.gentoo.org/798045
  10. ---
  11. libFDK/include/fft.h | 4 ++--
  12. libFDK/src/fft.cpp | 6 +++---
  13. 2 files changed, 5 insertions(+), 5 deletions(-)
  14. --- a/libFDK/include/fft.h
  15. +++ b/libFDK/include/fft.h
  16. @@ -139,7 +139,7 @@ void ifft(int length, FIXP_DBL *pInput,
  17. * bit scale headroom. The values are interleaved, real/imag pairs.
  18. */
  19. LNK_SECTION_CODE_L1
  20. -static FDK_FORCEINLINE void fft_4(FIXP_DBL *x) {
  21. +static inline void fft_4(FIXP_DBL *x) {
  22. FIXP_DBL a00, a10, a20, a30, tmp0, tmp1;
  23. a00 = (x[0] + x[4]) >> 1; /* Re A + Re B */
  24. @@ -168,7 +168,7 @@ static FDK_FORCEINLINE void fft_4(FIXP_D
  25. #ifndef FUNCTION_fft_8
  26. LNK_SECTION_CODE_L1
  27. -static FDK_FORCEINLINE void fft_8(FIXP_DBL *x) {
  28. +static inline void fft_8(FIXP_DBL *x) {
  29. FIXP_SPK w_PiFOURTH = {{FIXP_SGL(0x5A82), FIXP_SGL(0x5A82)}};
  30. FIXP_DBL a00, a10, a20, a30;
  31. --- a/libFDK/src/fft.cpp
  32. +++ b/libFDK/src/fft.cpp
  33. @@ -170,7 +170,7 @@ amm-info@iis.fraunhofer.de
  34. /* Performs the FFT of length 2. Input vector unscaled, output vector scaled
  35. * with factor 0.5 */
  36. -static FDK_FORCEINLINE void fft2(FIXP_DBL *RESTRICT pDat) {
  37. +static inline void fft2(FIXP_DBL *RESTRICT pDat) {
  38. FIXP_DBL r1, i1;
  39. FIXP_DBL r2, i2;
  40. @@ -196,7 +196,7 @@ static FDK_FORCEINLINE void fft2(FIXP_DB
  41. #ifndef FUNCTION_fft3
  42. /* Performs the FFT of length 3 according to the algorithm after winograd. */
  43. -static FDK_FORCEINLINE void fft3(FIXP_DBL *RESTRICT pDat) {
  44. +static inline void fft3(FIXP_DBL *RESTRICT pDat) {
  45. FIXP_DBL r1, r2;
  46. FIXP_DBL s1, s2;
  47. FIXP_DBL pD;
  48. @@ -233,7 +233,7 @@ static FDK_FORCEINLINE void fft3(FIXP_DB
  49. /* performs the FFT of length 5 according to the algorithm after winograd */
  50. /* This version works with a prescale of 2 instead of 3 */
  51. -static FDK_FORCEINLINE void fft5(FIXP_DBL *RESTRICT pDat) {
  52. +static inline void fft5(FIXP_DBL *RESTRICT pDat) {
  53. FIXP_DBL r1, r2, r3, r4;
  54. FIXP_DBL s1, s2, s3, s4;
  55. FIXP_DBL t;