diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 12:32:18 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 12:32:18 +0100 |
commit | 7af1cf8342f73410aba4a9edf0c54b918a6a775d (patch) | |
tree | a79b25a13d60cad12993f696eddcc4aa1cb75614 /gcc/ada/s-bignum.adb | |
parent | 2d7b3fa49dd6dabc94eb6ad86ccdbefdb851cf78 (diff) | |
download | gcc-7af1cf8342f73410aba4a9edf0c54b918a6a775d.zip gcc-7af1cf8342f73410aba4a9edf0c54b918a6a775d.tar.gz gcc-7af1cf8342f73410aba4a9edf0c54b918a6a775d.tar.bz2 |
[multiple changes]
2012-10-29 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor reformatting.
2012-10-29 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor rewording.
2012-10-29 Javier Miranda <miranda@adacore.com>
* exp_disp.ads (Is_Expanded_Dispatching_Call): New subprogram.
* exp_disp.adb (Expand_Dispatching_Call): No action needed if the
call has been already expanded.
(Is_Expanded_Dispatching_Call): New subprogram.
* sem_disp.adb (Propagate_Tag): No action needed if the call
has been already expanded.
2012-10-29 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb (Create_Index_And_Data): Remove local
variable Index_Typ and its uses. The type of the index is now
System.Tasking.Entry_Index. Update all related comments.
* rtsfind.ads: Add RE_Entry_Index in tables RE_Id and RE_Unit_Table.
* s-taskin.adb (Number_Of_Entries): The return type is now Entry_Index.
* s-taskin.ads: The index type of Task_Entry_Names_Array is now
Entry_Index.
(Number_Of_Entries): The return type is now Entry_Index.
* s-tpoben.adb (Number_Of_Entries): The return type is now Entry_Index.
* s-tpoben.ads: The index type of Protected_Entry_Names_Array
is now Entry_Index.
(Number_Of_Entries): The return type is now Entry_Index.
2012-10-29 Pascal Obry <obry@adacore.com>
* gnat_ugn.texi: Add note about SEH setup on x86-windows.
2012-10-29 Eric Botcazou <ebotcazou@adacore.com>
* s-bignum.adb (Allocate_Bignum): Use the exact layout of
Bignum_Data for the overlay.
From-SVN: r192936
Diffstat (limited to 'gcc/ada/s-bignum.adb')
-rw-r--r-- | gcc/ada/s-bignum.adb | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ada/s-bignum.adb b/gcc/ada/s-bignum.adb index 955df42..70486f2 100644 --- a/gcc/ada/s-bignum.adb +++ b/gcc/ada/s-bignum.adb @@ -233,14 +233,27 @@ package body System.Bignums is pragma Import (Ada, BD); -- Expose a writable view of discriminant BD.Len so that we can - -- initialize it. + -- initialize it. We need to use the exact layout of the record + -- for the overlay to shield ourselves from endianness issues. - BL : Length; - for BL'Address use BD.Len'Address; - pragma Import (Ada, BL); + type Bignum_Data_Header is record + Len : Length; + Neg : Boolean; + end record; + + for Bignum_Data_Header use record + Len at 0 range 0 .. 23; + Neg at 3 range 0 .. 7; + end record; + + BDH : Bignum_Data_Header; + for BDH'Address use BD'Address; + pragma Import (Ada, BDH); + + pragma Assert (BDH.Len'Size = BD.Len'Size); begin - BL := Len; + BDH.Len := Len; return B; end; end if; |