aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/cpuid.cpp
Commit message (Collapse)AuthorAgeFilesLines
* If we can't access cpuid, but we know that we are compiling forlloyd2010-08-081-0/+9
| | | | | | x86-64, then enable SSE2 anyway because we know any x86-64 processor does have SSE2, and the OS has to support it because it's part of the standard ABIs.
* Modify CPUID so all the check functions are purely inline. Add a newlloyd2010-07-261-38/+9
| | | | | initialize() call which must be called prior to use of any other functions.
* Use "/*" instead of "/**" in starting comments at the begining of a file.lloyd2010-06-071-1/+1
| | | | | This caused Doxygen to think this was markup meant for it, which really caused some clutter in the namespace page.
* Add a build.h macro BOTAN_GCC_VERSION which is set to major*100+minor*10+patchlloyd2010-05-131-2/+3
| | | | | | | | if we are compiling under GCC, or 0 otherwise. Use it in cpuid.cpp for use of GCC's cpuid.h header file. If we don't have a method of calling cpuid, print a warning.
* Avoid trying to use GCC's cpuid.h in versions where it doesn't existlloyd2010-05-061-1/+3
| | | | | (before 4.3). Probably will need to write asm blocks for those older versions.
* Move the get_byte template to its own header, because many fileslloyd2010-02-021-1/+1
| | | | including loadstor.h actually just needed get_byte and nothing else.
* Fix POWER6 AltiVec detectionlloyd2009-12-301-0/+1
|
* Oops, it's TARGET_CPU_IS_XXX_FAMILY, not TARGET_IS_XXX_FAMILY.lloyd2009-12-301-4/+4
| | | | Also, fix AltiVec detection on Linux and NetBSD for most G4s.
* Clean up AltiVec detection code. Add (untested) support for OS X AltiVeclloyd2009-12-301-53/+74
| | | | detection.
* Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-211-1/+1
| | | | | | | | | | | | | | bswap.h); too many external apps rely on loadstor.h existing. Define 64-bit generic bswap in terms of 32-bit bswap, since it's not much slower if 32-bit is also generic, and much faster if it's not. This may be quite helpful on 32-bit x86 in particular. Change formulation of generic 32-bit bswap. It may be faster or slower depending on the CPU, especially the latency and throuput of rotate instructions, but should be faster on an ideally superscalar processor with rotate instructions (ie, what I expect future CPUs to look more like).
* Make many more headers internal-only.lloyd2009-12-161-1/+1
| | | | | | | | | | | | | Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions.
* Slight cleanups in the Altivec detection code for readability.lloyd2009-10-291-5/+12
|
* Fix cpuid with icc (tested with 11.1)lloyd2009-10-291-2/+2
| | | | | Document SHA optimizations, AltiVec runtime checking, fixes for cpuid for both icc and msvc.
* No ||= operator!lloyd2009-10-291-7/+7
|
* Add CPUID::have_altivec for AltiVec runtime detection.lloyd2009-10-291-0/+60
| | | | | Relies on mfspr emulation/trapping by the kernel, which works on (at least) Linux and NetBSD.
* Add ; after call to VC++'s __cpuid, not a macrolloyd2009-10-251-1/+1
|
* Cast the u32bit output array to an int* when calling the VC++ intrinsic,lloyd2009-10-251-3/+6
| | | | | | | since it passes signed ints for whatever reason. Ensure CALL_CPUID is always defined (previously, it would not be if on an x86 but compiled with something other than GCC, ICC, VC++).
* Enable CPUID on x86 (checking wrong macro name)lloyd2009-10-211-1/+1
|
* Clean up cpuid callinglloyd2009-10-061-32/+26
|
* Add vendor ID for AMDlloyd2009-09-291-1/+1
|
* Significantly rework CPUID support. Add cache line detectionlloyd2009-09-291-61/+57
|
* Add some basic prefetching support (only supported with GNU C++ or thingslloyd2009-09-291-3/+3
| | | | | that claim to be by defining __GNUG__ (such as Intel C++)) in new utils header prefetch.h
* Add runtime cpuid support. Check in the SSE2 engine that SSE2 is actuallylloyd2009-09-251-0/+108
existing on the current CPU before returning an object.