Rearrange code and make a faster sha256sum program

This commit is contained in:
Justine Tunney 2022-11-02 23:12:32 -07:00
parent 5e60e5ad10
commit 89d1e5b8f2
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
32 changed files with 933 additions and 517 deletions

View file

@ -52,8 +52,11 @@
#endif
#endif
#if defined(__STRICT_ANSI__) || \
(!defined(__GNUC__) && !__has_builtin(unreachable))
#ifdef _MSC_VER
#define __builtin_unreachable() __assume(0)
#elif defined(__STRICT_ANSI__) || \
!((__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 405 || \
defined(__clang__) || defined(__INTEL_COMPILER))
#define __builtin_unreachable() \
for (;;) { \
}
@ -234,7 +237,9 @@ typedef struct {
#endif
#ifndef dontinline
#if !defined(__STRICT_ANSI__) && \
#ifdef _MSC_VER
#define dontinline __declspec(noinline)
#elif !defined(__STRICT_ANSI__) && \
(__has_attribute(__noinline__) || \
(__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 301)
#define dontinline __attribute__((__noinline__))