summaryrefslogtreecommitdiffstats
path: root/libdecnumber
Commit message (Collapse)AuthorAgeFilesLines
* libdecnumber/dpd/decimal64: Fix compiler warning from Clang 15Thomas Huth2022-11-111-2/+1Star
| | | | | | | | | | | | | | | | Clang 15 from Fedora 37 complains: ../libdecnumber/dpd/decimal64.c:620:8: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] Int n; /* output bunch counter */ ^ 1 error generated. Remove the unused variable to silence the compiler warning. Message-Id: <20221110131112.104283-1-thuth@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
* libdecnumber: Introduce decNumberIntegralToInt128Luis Pires2021-11-092-3/+99
| | | | | | | | | This will be used to implement PowerPC's dctfixqq. Signed-off-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211029192417.400707-7-luis.pires@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libdecnumber: introduce decNumberFrom[U]Int128Luis Pires2021-11-091-0/+36
| | | | | | | | | This will be used to implement PowerPC's dcffixqq. Signed-off-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211029192417.400707-2-luis.pires@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* qemu/: fix some comment spelling errorszhaolichang2020-09-171-1/+1
| | | | | | | | | | | I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the folder. Signed-off-by: zhaolichang <zhaolichang@huawei.com> Reviewed-by: Alex Bennee <alex.bennee@linaro.org> Message-Id: <20200917075029.313-2-zhaolichang@huawei.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* meson: targetPaolo Bonzini2020-08-212-5/+7
| | | | | | | | | Similar to hw_arch, each architecture defines two sourceset which are placed in dictionaries target_arch and target_softmmu_arch. These are then picked up from there when building the per-emulator static_library. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: remove CONFIG_LIBDECNUMBERPaolo Bonzini2017-10-161-0/+5
| | | | | | | | It is used by all PPC targets; we can give the directory its own Makefile.objs file, and include it directly from target/ppc. target/s390 can do the same when it starts using it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* decnumber: use DIV_ROUND_UPMarc-André Lureau2017-08-311-1/+1
| | | | | | | | I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
* libdecnumber: Clean up includesPeter Maydell2016-02-165-12/+5Star
| | | | | | | | | | 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. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com>
* typofixes - v4Veres Lajos2015-09-112-5/+5
| | | | | Signed-off-by: Veres Lajos <vlajos@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* remove libdecnumber/dpd/decimal128Local.hMichael Tokarev2015-06-231-42/+0Star
| | | | | | | | | | | | | | | | | | | | | | | Commit 72ac97cdfc added two equivalent versions of decimal128Local.h, one in libdecnumber/dpd/ and another in include/libdecnumber/dpd/. Being identical by the code, the two files however differs in the licensing terms. The one in libdecnumber/dpd/ (which is being removed by this patch) is licensed as GPL3.1 (plus gcc runtime exception), which, as far as I know, is not compatible with GPL-2. This file is not used (it is included from include/libdecnumber/dpd/decimal128.h, so version in include/ is used). More, the version in include/ can also be removed, since none of the 3 defines from that file are actually used by the code. Even more, one of the defines from there, decimal128SetSign, is redefined (to equivalent value) in libdecnumber/dpd/decimal128.c, but again, never used. What a mess... Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
* libdecnumber: Fix warnings from smatch (missing static, boolean operations)Stefan Weil2014-08-241-10/+11
| | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* libdecnumber: Fix decNumberSetBCDTom Musta2014-06-161-1/+1
| | | | | | | | | | | Fix a simple bug in the decNumberSetBCD() function. This function encodes a decNumber with "n" BCD digits. The original code erroneously computed the number of declets from the dn argument, which is the output decNumber value, and hence may contain garbage. Instead, the input "n" value is used. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Introduce decNumberIntegralToInt64Tom Musta2014-06-162-3/+49
| | | | | | | | | | | | 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/+30
| | | | | | | | | 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: Eliminate Unused Variable in decSetSubnormalTom Musta2014-06-161-2/+0Star
| | | | | | | | | Eliminate an unused variable in the decSetSubnormal routine. The variable dnexp is declared and eventually set but never used, and thus may trigger an unused-but-set-variable warning. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* libdecnumber: Eliminate redundant declarationsTom Musta2014-06-163-6/+0Star
| | | | | | | | | | Eliminate redundant declarations of symbols DPD2BIN and BIN2DPD in various .c source files. These symbols are already declared in decDPD.h and thus will trigger 'redundant redeclaration of ?XXX?' warnings, which, of course, may fail QEMU compilation. 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-20/+20
| | | | | | | | | | | | | | | | | | 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: Introduce libdecnumber CodeTom Musta2014-06-166-0/+10504
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>