< bitcoin-git>
bitcoin/master 6b3bb3d Gregory Maxwell: Change LogAcceptCategory to use uint32_t rather than sets of strings....
< bitcoin-git>
bitcoin/master 1a5aaab Wladimir J. van der Laan: Merge #9424: Change LogAcceptCategory to use uint32_t rather than sets of strings....
< bitcoin-git>
[bitcoin] laanwj closed pull request #9424: Change LogAcceptCategory to use uint32_t rather than sets of strings. (master...log_category_simplify) https://github.com/bitcoin/bitcoin/pull/9424
< gmaxwell>
at least on intel runtime autodetection is simple-- and as I've mentioned before, recent g++ has a sensible looking function overrides based way of doing the substitution.
< gmaxwell>
but leveldb didn't implement runtime? lameo.
< sipa>
yes, they detect at runtime
< wumpus>
they for fact have runtime detection, I saw HaveSSE42 in the file I linked
< wumpus>
dunno if they use it
< sipa>
but you still need a compiler that has support for it
< wumpus>
"In a separate source file to allow this accelerated CRC32C function to be compiled with the appropriate compiler flags to enable x86 SSE 4.2instructions."
< wumpus>
indeed
< wumpus>
that specific file needs special compiler flags
< sipa>
they use intel instrinsics in gcc, not native assembly
< gmaxwell>
yea thats a pretty normal approach, you have one file compiled with -msse4.2 and dispatch elsewhere calls into it only on the right hardware.
< gmaxwell>
I think some of the examples for the function overriding stuff used pragmas to push the compiler flags just for that function, so if I'm not misremembering apparently that works.
< wumpus>
cfields: do you have time to look at integrating the leveldb sse42 stuff into our build system? if not, no problem I'll take a look at it, it doesn't seem particularly difficult though I wouldn't know the autoconf/automake incantation for compiling a file with different flags
< sipa>
i think i can do it
< sipa>
ah, nvm, you only want that single file to have -msse4
< wumpus>
yep, that's the challenge :)
< sipa>
that i fon't know
< sipa>
*don't
< sipa>
probably needs a separate .a file?
< wumpus>
sse4.2 isn't yet widely available enough to compile everything with it, unlike sse2 for example which every 64-bit processor has
< wumpus>
every 64-bit *x86* processor sorry :)
< wumpus>
sipa: not sure, maybe the attributes can be added per .o file too
< sipa>
wumpus: as leveldb upstream does not look like they'll pick up my barrier patch anytime soon, i'll submit it to our leveldb repo instead?