[PATCH] cpu.c: merge ia32_cpu_info() and x86_64_cpu_info()

lvqcl <[email protected]>
Newsgroups gmane.comp.audio.compression.flac.devel
Message-ID <op.yv92o2xucba0by@userme-pc>
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().

_______________________________________________
flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev
cpu_merge.zip (application/zip, 4.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.