aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
Commit message (Collapse)AuthorAgeFilesLines
* More Doxygen updates/fixeslloyd2010-06-156-21/+32
|
* Fix a few hundred Doxygen warningslloyd2010-06-151-1/+1
|
* Expose a datestamp in build.h, provide function in version.h forlloyd2010-06-142-0/+10
| | | | getting runtime value.
* Use "/*" instead of "/**" in starting comments at the begining of a file.lloyd2010-06-0711-11/+11
| | | | | 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.
* Remove some C-style castslloyd2010-04-231-2/+2
|
* At startup, test if lock_mem() at least seems to work. If it doesn't,lloyd2010-03-132-0/+14
| | | | | immediately fall back the the plain malloc-based allocator, which is typically quite a bit faster.
* Add back the Integrity_Failure exception. For one, removing it causeslloyd2010-03-041-0/+9
| | | | | problems for Monotone, and anyway it is a reasonable exception to have around for signalling MAC validation errors, etc.
* Fix stupid typolloyd2010-03-031-1/+1
|
* Pass the args to SIMD_32 variant of rotate_left/rotate_right as constlloyd2010-03-031-6/+6
| | | | | reference. Otherwise Visual C++ dies because apparently the Win32 ABI doesn't know how to pass a __m128i as a function parameter. :/
* Use static_cast if using std::time-based get_nanoseconds_clock to makelloyd2010-03-031-2/+6
| | | | | | it obvious that truncation is occuring. Something to deal with in 2038 I guess, though get_nanoseconds_clock is already an unknown/unspecified epoch (since the Windows timer uses 1/1/1601 as the epoch)
* Switch back to stdio.h-based debug funcs, iostreams was broken and sillylloyd2010-02-141-11/+8
|
* Call global functions with :: prefixlloyd2010-02-141-4/+4
|
* Move the get_byte template to its own header, because many fileslloyd2010-02-025-12/+31
| | | | including loadstor.h actually just needed get_byte and nothing else.
* Inline debug funcs to debug.h, make print_vec a template on the base typelloyd2010-01-213-38/+15
|
* Add operator& and non-mutating rotates to SIMD_32lloyd2010-01-124-0/+34
|
* merge of 'bf0e5684d8ba5fb0a21cdcd11d26995cbb250c4a'lloyd2010-01-072-67/+18
|\ | | | | | | and 'e30a741f6014987e9683842ede22c44b2db03c56'
| * Clean up exceptions. Remove some unused ones like Config_Error. Makelloyd2010-01-052-67/+18
| | | | | | | | | | | | | | Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail.
* | simd_32 should be autoload, not always. Copy+pasted from util's info.txtlloyd2010-01-061-2/+0
|/
* Remove stubs for VIA Padlock support. I have no plans to implement itlloyd2010-01-051-7/+1
| | | | | | and don't even have access to a VIA with AES so could not test it anyway. If someone else wants to do it, then the implementation for AES-NI should provide a good template.
* merge of 'a51f8d7dec78251a3a4ccf162b346c289fc1d72a'lloyd2010-01-043-112/+85
|\ | | | | | | and 'aafa02a299b61c7762ae71dfc429396aa6bd25b3'
| * Remove Exception::set_msg. Inline all exception constructors.lloyd2010-01-043-112/+85
| |
* | Remove pshufb-based bswap_4; it causes problems too easily with externallloyd2010-01-041-21/+1
|/ | | | | | application code that wants to use loadstor.h, since that loads bswap.h and if SSSE3 isn't enabled via -march GCC will error out. Doesn't seem to be at all faster than the shuffle-based bswap for SSE2 on a Core2 in any case.
* Fix POWER6 AltiVec detectionlloyd2009-12-301-0/+1
|
* Oops, it's TARGET_CPU_IS_XXX_FAMILY, not TARGET_IS_XXX_FAMILY.lloyd2009-12-302-5/+5
| | | | 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.
* Use IS_XXX_FAMILY macros where usefullloyd2009-12-301-2/+1
|
* Mark read/write prefetches as such, instead of read-only prefetchlloyd2009-12-291-1/+1
|
* Kill buf_op - was basically the prototype for Buffering_Filter.lloyd2009-12-283-176/+0
| | | | | | It would be useful in its own right, many other things need to do hashing, but the tr1 dependency kills it right now. Something to revisit in the C++0x branch, perhaps?
* propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-273-0/+176
|\ | | | | | | | | | | 5749645b3dc61c94f9b2980aa7773a3849105a81) to branch 'net.randombit.botan.buf-op' (head 7c1f7c88bd4d016ff49f098e47ac6032ff43041b)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-273-0/+176
| |\ | | | | | | | | | | | | | | | 79ed5b0f9057b2d40335e268fdb9f375837d1d11) to branch 'net.randombit.botan.buf-op' (head 87160704bdc30b0a4cb19fd4516e20e85dca2869)
| | * Add a generalized Buffered_Operation. Relies on tr1 for sane callbackslloyd2009-12-273-0/+176
| | | | | | | | | | | | (std::tr1::function).
* | | Add debug source to build. Fix typo in source.lloyd2009-12-272-2/+1
|/ /
* / Add debug.h which is an internal-only header with debug functions thatlloyd2009-12-273-0/+65
|/ | | | I tend to rewrite often in particular files while debugging things.
* Add/fix doxygen commentslloyd2009-12-241-5/+12
|
* Replace time_t_to_tm with calendar_value which returns a struct representinglloyd2009-12-242-6/+24
| | | | the calendar time without tying to a particular format. From the C++0x branch.
* Wrap up whatever we're using for gmtime in an anon-namespace function do_gmtimelloyd2009-12-241-14/+19
|
* Fix compile of get_nanoseconds_clock for Windows.lloyd2009-12-231-2/+12
| | | | | | | Add macros for OS support of gmtime_r (Unix) and gmtime_s (Win32) to deal with thread-unsafety of std::gmtime. Only enable gmtime_r on Linux currently, but it's probably available pretty much everywhere (specified in pthreads, origininally, AFAICT).
* Add a static_cast<byte>() around get_byte just to keep VC++ quiet.lloyd2009-12-231-1/+3
|
* Use unaligned reads/writes in xor_buf.h - bad macro name!lloyd2009-12-231-2/+2
|
* Deal with unknown or mixed endian architectures properly. If known littlelloyd2009-12-231-22/+18
| | | | | | or big endian, for large loads always memcpy, then go back and swap as needed. Otherwise (unknown or mixed endian) just load one at a time as usual.
* Add bswap_4 which swaps 4 Ts in parallel. Normally just uses reverse_bytes,lloyd2009-12-231-0/+50
| | | | | but if SSE2 or SSSE3 is available uses SIMD magic to swap 4 32 bit values at once.
* Add GetSystemTimeAsFileTime as high res timer for Win32lloyd2009-12-221-7/+21
|
* Fix simd_32 loadstor includeslloyd2009-12-222-3/+3
|
* Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-215-20/+27
| | | | | | | | | | | | | | 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).
* Add missing BOTAN_DLL exports.lloyd2009-12-162-7/+9
| | | | Move most of the engine headers to internal
* Make many more headers internal-only.lloyd2009-12-1610-18/+20
| | | | | | | | | | | | | 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.
* Full working amalgamation build, plus internal-only headers concept.lloyd2009-12-169-17/+59
|
* Consolidate the non-canonical epoch timers, like cpuid and Win32'slloyd2009-12-013-1/+118
| | | | | | | | | | | | | | QueryPerformanceCounter, into an entropy source hres_timer. Its results, if any, do not count as contributing entropy to the poll. Convert the other (monotonic/fixed epoch) timers to a single function get_nanoseconds_clock(), living in time.h, which statically chooses the 'best' timer type (clock_gettime, gettimeofday, std::clock, in that order depending on what is available). Add feature test macros for clock_gettime and gettimeofday. Remove the Timer class and timer.h. Remove the Timer& argument to the algorithm benchmark function.