Avoid the stack in assembly and use explicit registers #142

pull sipa wants to merge 2 commits into bitcoin-core:master from sipa:inlineasm changing 1 files +100 −100
  1. sipa commented at 4:29 pm on December 8, 2014: contributor

    There is a ‘red zone’ which is 128 bytes beyond the stack, for scratch space which may be overwritten by other functions. Turns out, if the compiler uses this space in a function with an inline asm block, you basically can’t use the stack, as you don’t know what the stack pointer points to.

    Workaround: allocate the temporaries outside of the assembly code, which has the extra advantage of potentially using the red zone optimization.

  2. jgarzik commented at 4:55 pm on December 8, 2014: none
    por que?
  3. sipa commented at 5:00 pm on December 8, 2014: contributor
    Updated the description.
  4. sipa force-pushed on Dec 8, 2014
  5. sipa force-pushed on Dec 8, 2014
  6. sipa force-pushed on Dec 8, 2014
  7. sipa commented at 10:00 pm on December 8, 2014: contributor
    @jgarzik @gmaxwell Ready for review.
  8. sipa force-pushed on Dec 8, 2014
  9. sipa force-pushed on Dec 8, 2014
  10. Avoid the stack in assembly and use explicit registers e66d4d6d39
  11. Explicitly access %0..%2 as 64-bit so we use the right registers for x32 ABI f22d73e757
  12. sipa force-pushed on Dec 9, 2014
  13. sipa cross-referenced this on Dec 9, 2014 from issue Explicitly access %0..%2 as 64-bit so we use the right registers for x32 ABI by luke-jr
  14. gmaxwell commented at 11:48 pm on December 10, 2014: contributor
    ACK.
  15. sipa merged this on Dec 10, 2014
  16. sipa closed this on Dec 10, 2014

  17. sipa referenced this in commit 3907277dcf on Dec 10, 2014

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 09:15 UTC

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