aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/cpuid.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add AltiVec detection on OpenBSD, contributed by Brad Smith in PR 162lloyd2011-11-281-1/+15
|
* Call cpuid via inline asm on x86-64, so we can use it with Clang (nolloyd2011-11-181-2/+16
| | | | cpuid intrinsic) and older GCC (no cpuid.h before 4.3)
* Add AltiVec detection for POWER7 processorslloyd2011-11-021-0/+2
|
* Rename all references of ia32 to x86-32 and amd64 to x86-64.lloyd2011-04-221-1/+1
| | | | | | Back the reported version from 1.10.0 to 1.9.17 for the time being. Still on the fence if this will be 1.10.0 or another release candidate instead.
* Maintainer mode warning cleanups, mostly for C style casts which Illoyd2011-04-181-1/+1
| | | | added to the flags here.
* My workaround for gcc pr 44174 caused cpuid support to be silentlylloyd2011-04-181-2/+8
| | | | | | | disabled under gcc. Hide asm labels in the x86-32 code; some did not begin with a .L so they were being exported.
* Call GCC's __get_cpuid macro from a function marked noinline to worklloyd2011-04-061-2/+9
| | | | | around a bug in GCC 4.[456] that prevents compilation when using optimization and PIC on 32-bit x86.
* According to PR 137, cpuid.h doesn't exist with Clang on OS X orlloyd2011-01-211-1/+1
| | | | | | | | FreeBSD. It is not being installed by Clang, so it appears on my machine Clang is actually pulling the header in from GCC's private include directory. Closes PR 137
* Clang 2.8 also has cpuid.hlloyd2010-11-291-1/+1
|
* s/u32bit/size_t/ in utilslloyd2010-10-131-1/+1
|
* 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.