diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-22 13:53:46 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-22 13:53:46 +0000 |
commit | e4563f0dfa7f1b26309630ed0b91ea96cc256755 (patch) | |
tree | 0c285ad5daaa531e4663b4c3851f4a91cf472cab /gcc/ada/uintp.ads | |
parent | 7be3ddddb3a4b83439bf643e06377ef59565f6ee (diff) | |
download | ppe42-gcc-e4563f0dfa7f1b26309630ed0b91ea96cc256755.tar.gz ppe42-gcc-e4563f0dfa7f1b26309630ed0b91ea96cc256755.zip |
2010-06-22 Gary Dismukes <dismukes@adacore.com>
* sem_ch5.adb (Analyze_Assignment): Revise test for illegal assignment
to abstract targets to check that the type is tagged and comes from
source, rather than only testing for targets of interface types. Remove
premature return.
2010-06-22 Vincent Celier <celier@adacore.com>
* vms_data.ads: Modify the declarations of qualifiers
/UNCHECKED_SHARED_LIB_IMPORTS to allow the generation of gnat.hlp
without error.
2010-06-22 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false if
expansion is disabled.
2010-06-22 Robert Dewar <dewar@adacore.com>
* makeusg.adb: Minor reformatting.
2010-06-22 Robert Dewar <dewar@adacore.com>
* types.ads: (Dint): Removed, no longer used anywhere.
* uintp.adb (UI_From_CC): Use UI_From_Int, range is sufficient.
(UI_Mul): Avoid use of UI_From_Dint.
(UI_From_Dint): Removed, not used.
* uintp.ads (UI_From_Dint): Removed, not used.
(Uint_Min/Max_Simple_Mul): New constants.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161187 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/uintp.ads')
-rw-r--r-- | gcc/ada/uintp.ads | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/ada/uintp.ads b/gcc/ada/uintp.ads index 492498d6cf2..d222c52c12f 100644 --- a/gcc/ada/uintp.ads +++ b/gcc/ada/uintp.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -233,9 +233,6 @@ package Uintp is -- given Modulo (uses Euclid's algorithm). Note: the call is considered -- to be erroneous (and the behavior is undefined) if n is not invertible. - function UI_From_Dint (Input : Dint) return Uint; - -- Converts Dint value to universal integer form - function UI_From_Int (Input : Int) return Uint; -- Converts Int value to universal integer form @@ -404,7 +401,8 @@ private -- Base is defined to allow efficient execution of the primitive operations -- (a0, b0, c0) defined in the section "The Classical Algorithms" -- (sec. 4.3.1) of Donald Knuth's "The Art of Computer Programming", - -- Vol. 2. These algorithms are used in this package. + -- Vol. 2. These algorithms are used in this package. In particular, + -- the product of two single digits in this base fits in a 32-bit integer. Base_Bits : constant := 15; -- Number of bits in base value @@ -470,6 +468,11 @@ private Uint_Minus_80 : constant Uint := Uint (Uint_Direct_Bias - 80); Uint_Minus_128 : constant Uint := Uint (Uint_Direct_Bias - 128); + Uint_Max_Simple_Mul : constant := Uint_Direct_Bias + 2 ** 15; + -- If two values are directly represented and less than or equal to this + -- value, then we know the product fits in a 32-bit integer. This allows + -- UI_Mul to efficiently compute the product in this case. + type Save_Mark is record Save_Uint : Uint; Save_Udigit : Int; |