diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-19 12:05:35 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-19 12:05:35 +0100 |
commit | a767d69b628706fb1c4986232b00ccb61a911ebe (patch) | |
tree | 3d6d6f007167e2b2dca010de1831d469c4aacb35 /gcc/ada/bindgen.adb | |
parent | adb252d824eac519413d0114a813543391c10592 (diff) | |
download | gcc-a767d69b628706fb1c4986232b00ccb61a911ebe.zip gcc-a767d69b628706fb1c4986232b00ccb61a911ebe.tar.gz gcc-a767d69b628706fb1c4986232b00ccb61a911ebe.tar.bz2 |
[multiple changes]
2014-02-19 Robert Dewar <dewar@adacore.com>
* exp_util.adb: Update comments.
2014-02-19 Doug Rupp <rupp@adacore.com>
* bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
* init.c (__gl_float_format): [VMS] New global.
(__gnat_set_features): Call FP_CONTROL to set FPSR for the float
representation in effect.
2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb Add with and use clause for Exp_Prag.
(Expand_Contract_Cases): Relocated to Exp_Prag.
* exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
* exp_prag.adb Add with and use clauses for Checks and Validsw.
(Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
structure of the expanded code to showcase the evaluation of
attribute 'Old prefixes. Add local variable Old_Evals. Expand
any attribute 'Old references found within a consequence. Add
circuitry to evaluate the prefixes of attribute 'Old that
belong to a selected consequence.
(Expand_Old_In_Consequence): New routine.
* exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
* sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
potentially unevaluated prefix is always evaluated.
From-SVN: r207891
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r-- | gcc/ada/bindgen.adb | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 7174144..270aa5e 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, 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- -- @@ -132,7 +132,7 @@ package body Bindgen is -- Run-Time Globals -- ---------------------- - -- This section documents the global variables that set from the + -- This section documents the global variables that are set from the -- generated binder file. -- Main_Priority : Integer; @@ -167,6 +167,9 @@ package body Bindgen is -- -Hnn parameter for the binder or by the GNAT$NO_MALLOC_64 logical. -- Valid values are 32 and 64. This switch is only effective on VMS. + -- Float_Format is the float representation in use. Valid values are + -- 'I' for IEEE and 'V' for VAX Float. This is only for VMS. + -- WC_Encoding shows the wide character encoding method used for the main -- program. This is one of the encoding letters defined in -- System.WCh_Con.WC_Encoding_Letters. @@ -677,6 +680,13 @@ package body Bindgen is Write_Statement_Buffer; end if; + + WBI (""); + WBI (" Float_Format : Character;"); + WBI (" pragma Import (C, Float_Format, " & + """__gl_float_format"");"); + + Write_Statement_Buffer; end if; -- Initialize stack limit variable of the environment task if the @@ -868,6 +878,25 @@ package body Bindgen is -- Generate call to Set_Features if OpenVMS_On_Target then + + -- Set_Features will call IEEE$SET_FP_CONTROL appropriately + -- depending on the setting of Float_Format. + + WBI (""); + Set_String (" Float_Format := '"); + + if Float_Format_Specified = 'G' + or else + Float_Format_Specified = 'D' + then + Set_Char ('V'); + else + Set_Char ('I'); + end if; + + Set_String ("';"); + Write_Statement_Buffer; + WBI (""); WBI (" if Features_Set = 0 then"); WBI (" Set_Features;"); |