-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixup define checks. Cleans up some oopses from #5. #11
Conversation
theuni
commented
Jul 31, 2017
- use "#if defined(foo)" rather than "#if foo"
- Use the same guard for the cpuid header and the function
- use "#if defined(foo)" rather than "#if foo" - Use the same guard for the cpuid header and the function
ACK |
8b1cd37 fixup define checks. Cleans up some oopses from #5. (Cory Fields) Pull request description: - use "#if defined(foo)" rather than "#if foo" - Use the same guard for the cpuid header and the function Tree-SHA512: fe83895055faf9f5491b9af44262a4dc15d9f56ec8f818e7d66c1002bb6568a90345662828abc7baab0772baa646f9cf13f8ba586ebad5fc3678731b27585885
@@ -8,7 +8,7 @@ | |||
#include <stdio.h> | |||
#include <string.h> | |||
|
|||
#if defined(__GNUC__) | |||
#if (defined(__x86_64__) || defined(__i386__)) && defined(__GNUC__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be #if defined(ARCH_CPU_X86_FAMILY) && defined(__GNUC__)
?
@@ -54,7 +54,7 @@ void InitOnce(OnceType* once, void (*initializer)()) { | |||
} | |||
|
|||
bool HasAcceleratedCRC32C() { | |||
#if (__x86_64__ || __i386__) && defined(__GNUC__) | |||
#if (defined(__x86_64__) || defined(__i386__)) && defined(__GNUC__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
@@ -145,7 +145,7 @@ void AtomicPointer::NoBarrier_Store(void* v) { | |||
} | |||
|
|||
bool HasAcceleratedCRC32C() { | |||
#if (__x86_64__ || __i386__) | |||
#if defined(__x86_64__) || defined(__i386__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if defined(ARCH_CPU_X86_FAMILY)
?
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962ff0..c521b3ac6 (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)
b13a68e Squashed 'src/leveldb/' changes from 196962ff0..c521b3ac6 (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
Summary: Includes: bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from Bitcoin-ABC#5 (Cory Fields) Removes many warnings on MacOSX of the form: In file included from leveldb/util/cache.cc:10: In file included from ./leveldb/port/port.h:14: In file included from ./leveldb/port/port_posix.h:47: ./leveldb/port/atomic_pointer.h:55:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations] OSMemoryBarrier(); ^ The bitcoin core patches have been included in BU already by sickpig. Test Plan: make check. Installed and running fine. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D584
Summary: Includes: bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Removes many warnings on MacOSX of the form: In file included from leveldb/util/cache.cc:10: In file included from ./leveldb/port/port.h:14: In file included from ./leveldb/port/port_posix.h:47: ./leveldb/port/atomic_pointer.h:55:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations] OSMemoryBarrier(); ^ The bitcoin core patches have been included in BU already by sickpig. Test Plan: make check. Installed and running fine. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D584
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962ff0..c521b3ac6 (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille) Pull request description: Includes: * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille) * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields) * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis) * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo) * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields) Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315