]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Make System.Generic_Bignums more flexible
authorArnaud Charlet <charlet@adacore.com>
Mon, 25 May 2020 15:30:56 +0000 (11:30 -0400)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:17:09 +0000 (13:17 -0300)
commite6af1ab58d8971f25091a72c3838f9ea8693fc4e
treeb2ef698e6473b213e5d54ea6c461b252289568ce
parent1f8f8d65b56b88a36a54f93db92e1c123266e92d
[Ada] Make System.Generic_Bignums more flexible

gcc/ada/

* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-shabig.o.
* libgnat/s-shabig.ads: New file to share definitions.
* libgnat/s-genbig.ads, libgnat/s-genbig.adb: Reorganized to
make it more generic and flexible in terms of memory allocation
and data structure returned.
(To_String): Moved to System.Generic_Bignums to allow sharing
this code.
(Big_And, Big_Or, Big_Shift_Left, Big_Shift_Right): New.
* libgnat/s-bignum.adb, libgnat/s-bignum.ads: Adapt to new
System.Generic_Bignums spec.
* libgnat/a-nbnbin.adb: Likewise.
(To_String): Moved to System.Generic_Bignums to allow sharing
this code.
* libgnat/a-nbnbre.adb (Normalize): Fix handling of Num = 0
leading to an exception.
gcc/ada/Makefile.rtl
gcc/ada/libgnat/a-nbnbin.adb
gcc/ada/libgnat/a-nbnbre.adb
gcc/ada/libgnat/s-bignum.adb
gcc/ada/libgnat/s-bignum.ads
gcc/ada/libgnat/s-genbig.adb
gcc/ada/libgnat/s-genbig.ads
gcc/ada/libgnat/s-shabig.ads [new file with mode: 0644]