summaryrefslogtreecommitdiffstats
path: root/include/libdecnumber
Commit message (Collapse)AuthorAgeFilesLines
* Clean up ill-advised or unusual header guardsMarkus Armbruster2016-07-125-10/+15
| | | | | | | Cleaned up with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
* libdecnumber: Don't error out on decNumberLocal.h re-inclusionMarkus Armbruster2016-07-121-2/+0Star
| | | | | | | | | | | decNumberLocal.h errors out when it's included with its header guard defined. This catches multiple inclusions. Drop that. Including it multiple times is safe, and the compiler can do it efficiently. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
* libdecnumber: Don't fool around with guards to avoid #includeMarkus Armbruster2016-07-124-12/+4Star
| | | | | | | | | Some libdecnumber headers avoid including decNumber.h or decContext.h again by checking their header guards. Don't. Including them multiple times is safe, and the compiler can do it efficiently. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
* Clean up header guards that don't match their file nameMarkus Armbruster2016-07-121-2/+3
| | | | | | | | | | | | Header guard symbols should match their file name to make guard collisions less likely. Offenders found with scripts/clean-header-guards.pl -vn. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
* include: Clean up includesPeter Maydell2016-02-233-6/+0Star
| | | | | | | | | | | | | | Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. NB: If this commit breaks compilation for your out-of-tree patchseries or fork, then you need to make sure you add #include "qemu/osdep.h" to any new .c files that you have. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com>
* Fix new typos in comments (found by codespell)Stefan Weil2014-07-181-1/+1
| | | | | | | | arbitary -> arbitrary basicly -> basically Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* libdecnumber: Introduce decNumberIntegralToInt64Tom Musta2014-06-162-1/+2
| | | | | | | | | | | | Introduce a new conversion function to the libdecnumber library. This function converts a decNumber to a signed 64-bit integer. In order to support 64-bit integers (which may have up to 19 decimal digits), the existing "powers of 10" array is expanded from 10 to 19 entries. Signed-off-by: Tom Musta <tommusta@gmail.com> [agraf: fix 32bit host compile] Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Introduce decNumberFrom[U]Int64Tom Musta2014-06-161-0/+2
| | | | | | | | | Introduce two conversion functions to the libdecnumber library. These conversions transform 64 bit integers to the internal decNumber representation. Both a signed and unsigned version is added. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Change gstdint.h to stdint.hTom Musta2014-06-161-1/+1
| | | | | | | | Replace the inclusion of gstdint.h with the standard stdint.h header file. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Modify dconfig.h to Integrate with QEMUTom Musta2014-06-161-18/+6Star
| | | | | | | | | | | | | | | Modify the dconfig.h header file so that libdecnumber code integrates QEMU configuration. Specifically: - the WORDS_BIGENDIAN preprocessor macro is used in libdecnumber code to determines endianness. It is derived from the existing QEMU macro HOST_WORDS_BIGENDIAN which is defined in config-host.h. - the DECPUN macro determines the number of decimal digits (aka declets) per unit (byte). This is 3 for PowerPC DFP. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Prepare libdecnumber for QEMU include structureTom Musta2014-06-165-5/+5
| | | | | | | | | | | | | | | | | | Consistent with other libraries in QEMU, the libdecnumber header files were placed in include/libdecnumber, separate from the C code. This is different from the original libdecnumber source, where they were co-located. Change the libdecnumber source code so that it reflects this split. Specifically, modify directives of the form: #include "xxx.h" to look like: #include "libdecnumber/xxx.h" Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Eliminate #include *Symbols.hTom Musta2014-06-167-8/+0Star
| | | | | | | | | | The various *Symbols.h files were not copied from the original GCC libdecnumber library; they are not necessary for use in QEMU. Remove all instances of #include "*Symbols.h" Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Introduce libdecnumber CodeTom Musta2014-06-169-0/+2740
Add files from the libdecnumber decimal floating point library to QEMU. The libdecnumber library was originally part of GCC and contains code that is useful in emulating the PowerPC decimal floating point (DFP) instructions. This particular copy of the source comes from GCC 4.3 and is licensed at GPLv2+. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>