8000 export `t1ha0_resolve` when `t1ha0_funcptr` not available by flier · Pull Request #25 · erthink/t1ha · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

export t1ha0_resolve when t1ha0_funcptr not available #25

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/t1ha0.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ static uint64_t x86_cpu_features(void) {
}
#endif /* T1HA0_AESNI_AVAILABLE && __ia32__ */

static
#if __GNUC_PREREQ(4, 0) || __has_attribute(used)
__attribute__((used))
#endif
Expand Down
4 changes: 3 additions & 1 deletion t1ha.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ uint64_t t1ha0_ia32aes_avx2(const void *data, size_t length, uint64_t seed);
#if T1HA0_RUNTIME_SELECT
#if T1HA_USE_INDIRECT_FUNCTIONS
T1HA_API uint64_t t1ha0(const void *data, size_t length, uint64_t seed);
#else
#elif __GNUC_PREREQ(4, 0) || __has_attribute(constructor)
/* Otherwise function pointer will be used.
* Unfortunately this may cause some overhead calling. */
T1HA_API extern uint64_t (*t1ha0_funcptr)(const void *data, size_t length,
Expand All @@ -567,6 +567,8 @@ static __force_inline uint64_t t1ha0(const void *data, siz 5586 e_t length,
uint64_t seed) {
return t1ha0_funcptr(data, length, seed);
}
#else /* T1HA_USE_INDIRECT_FUNCTIONS */
T1HA_API extern uint64_t (*t1ha0_resolve(void))(const void *, size_t, uint64_t);
#endif /* T1HA_USE_INDIRECT_FUNCTIONS */

#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
Expand Down
0