[flac-dev] [PATCH] cpu.c: merge ia32_cpu_info() and x86_64_cpu_info()
lvqcl
lvqcl.mail at gmail.com
Sun Feb 26 17:25:40 UTC 2017
ia32_cpu_info() and x86_64_cpu_info() functions became very
similar after the removal of OS SSE detection stuff.
It makes sense to merge them to make the code less redundant.
All 32/64-bit specific code was moved into separate helper functions.
Now the structure of cpu.c is basically this:
... includes
#if CONDITION
... helper functions and definitions
#endif
static void x86_cpu_info(FLAC__CPUInfo *info)
{
#if CONDITION
... code
#else
info->use_asm = false;
#endif
}
I tried to move all #ifdefery into those small helper functions,
to simplify x86_cpu_info().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpu_merge.zip
Type: application/zip
Size: 4465 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20170226/9c7af32e/attachment.zip>
More information about the flac-dev
mailing list