crypto/sha256: Use pragmas to enforce necessary intrinsics for GCC and Clang #13789

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:bugfix_asm_pragmas changing 3 files +30 −0
  1. luke-jr commented at 7:43 pm on July 28, 2018: member

    This avoids problems when the user specifies CXXFLAGS explicitly disabling the relevant optimisations.

    Partially fixes #13758, only for GCC/Clang.

    NOTE: src/leveldb/port/port_posix_sse.cc has the same issue (only with our build system?), which is NOT addressed here.

  2. DrahtBot commented at 7:52 pm on July 28, 2018: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  3. luke-jr force-pushed on Jul 29, 2018
  4. luke-jr force-pushed on Jul 29, 2018
  5. maflcko added this to the milestone 0.17.0 on Jul 30, 2018
  6. laanwj commented at 6:14 pm on July 31, 2018: member
    Not sure this is the right way to go about it. IMO passing the correct compilation flags is something that needs to be fixed in the build system, not worked around with compiler-specific pragmas in the code.
  7. laanwj added the label Build system on Jul 31, 2018
  8. sipa commented at 6:33 pm on July 31, 2018: member
    crypto/sha256_sse4.cpp doesn’t actually need this, as it’s written using inline assembly rather than compiler intrinsics. The assembly is passed through to the assembler without the compiler interpreting or understanding.
  9. maflcko removed this from the milestone 0.17.0 on Aug 4, 2018
  10. maflcko commented at 3:40 pm on April 8, 2019: member
    @luke-jr Is this still relevant after the recent discussion?
  11. DrahtBot closed this on Apr 28, 2019

  12. DrahtBot reopened this on Apr 28, 2019

  13. DrahtBot closed this on Mar 9, 2020

  14. DrahtBot reopened this on Mar 9, 2020

  15. DrahtBot added the label Needs rebase on Apr 22, 2020
  16. DrahtBot commented at 2:14 pm on April 22, 2020: contributor

    🐙 This pull request conflicts with the target branch and needs rebase.

  17. luke-jr force-pushed on May 14, 2020
  18. luke-jr commented at 4:04 am on May 14, 2020: member

    I haven’t seen anything that would make this irrelevant.

    Rebased

  19. sipa commented at 4:35 am on May 14, 2020: member

    Concept ACK, I think this is cleaner than doing it in the build system, actually. Maybe it makes sense to add a macro in a util/ file so no compiler-specific code is needed here.

    sha256_sse4.cpp does not need this, as it’s written using inline assembly, not intrinsics.

  20. fanquake removed the label Needs rebase on May 14, 2020
  21. crypto/sha256: Use pragmas to enforce necessary intrinsics for GCC and Clang
    This avoids problems when the user specifies CXXFLAGS explicitly disabling the relevant optimisations.
    14337d0d80
  22. luke-jr force-pushed on May 14, 2020
  23. luke-jr commented at 5:26 am on May 14, 2020: member

    sha256_sse4.cpp does not need this, as it’s written using inline assembly, not intrinsics.

    Confirmed with -mno-sse4 and fixed/removed

  24. DrahtBot added the label Needs rebase on Feb 14, 2022
  25. DrahtBot commented at 8:50 pm on February 14, 2022: contributor

    🐙 This pull request conflicts with the target branch and needs rebase.

    Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a “draft”.

  26. fanquake referenced this in commit 4349051dd4 on Aug 15, 2022
  27. maflcko referenced this in commit 02aefa169a on Aug 19, 2022
  28. maflcko closed this on Aug 19, 2022

  29. sidhujag referenced this in commit 2fcf9e0062 on Aug 19, 2022
  30. Rspigler referenced this in commit e8231e98db on Aug 21, 2022
  31. bitcoin locked this on Aug 19, 2023
  32. bitcoin unlocked this on Dec 5, 2023
  33. maflcko commented at 7:51 am on December 5, 2023: member
    (This was automatically closed as part of commit 02aefa169a9e6ed12c7bd8f3392adcd073d8d56b)
  34. bitcoin locked this on Dec 5, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 00:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me