summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 10:49:27 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 10:49:27 +0000
commita3754c0a3337fed94c2bc4ff4478e2f38f9886ee (patch)
tree28edc682daeb16578d18925d91b620d23bc17180
parent04409526edd351b982136e99acaaa3189fc427ce (diff)
downloadppe42-gcc-a3754c0a3337fed94c2bc4ff4478e2f38f9886ee.tar.gz
ppe42-gcc-a3754c0a3337fed94c2bc4ff4478e2f38f9886ee.zip
2009-11-30 Arnaud Charlet <charlet@adacore.com>
* s-tassta.adb: Update comment. 2009-11-30 Robert Dewar <dewar@adacore.com> * a-ngelfu.adb: Minor code reorganization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154780 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog8
-rw-r--r--gcc/ada/a-ngelfu.adb36
-rw-r--r--gcc/ada/s-tassta.adb4
3 files changed, 34 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e07b4fa0b45..ff2bbb291cc 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-30 Arnaud Charlet <charlet@adacore.com>
+
+ * s-tassta.adb: Update comment.
+
+2009-11-30 Robert Dewar <dewar@adacore.com>
+
+ * a-ngelfu.adb: Minor code reorganization.
+
2009-11-30 Robert Dewar <dewar@adacore.com>
* osint.ads, prj.adb, prj.ads: Minor reformatting
diff --git a/gcc/ada/a-ngelfu.adb b/gcc/ada/a-ngelfu.adb
index 55d14e7db53..aa06c983605 100644
--- a/gcc/ada/a-ngelfu.adb
+++ b/gcc/ada/a-ngelfu.adb
@@ -68,9 +68,8 @@ package body Ada.Numerics.Generic_Elementary_Functions is
-- FP type.
function Local_Atan
- (Y : Float_Type'Base;
- X : Float_Type'Base := 1.0)
- return Float_Type'Base;
+ (Y : Float_Type'Base;
+ X : Float_Type'Base := 1.0) return Float_Type'Base;
-- Common code for arc tangent after cycle reduction
----------
@@ -721,20 +720,35 @@ package body Ada.Numerics.Generic_Elementary_Functions is
----------------
function Local_Atan
- (Y : Float_Type'Base;
- X : Float_Type'Base := 1.0)
- return Float_Type'Base
+ (Y : Float_Type'Base;
+ X : Float_Type'Base := 1.0) return Float_Type'Base
is
Z : Float_Type'Base;
Raw_Atan : Float_Type'Base;
begin
- Z := (if abs Y > abs X then abs (X / Y) else abs (Y / X));
+ -- Z := (if abs Y > abs X then abs (X / Y) else abs (Y / X));
+
+ -- Raw_Atan :=
+ -- (if Z < Sqrt_Epsilon then Z
+ -- elsif Z = 1.0 then Pi / 4.0
+ -- else Float_Type'Base (Aux.Atan (Double (Z))));
+
+ -- Replace above with IF statements for now (ASIS gnatelim problem???)
- Raw_Atan :=
- (if Z < Sqrt_Epsilon then Z
- elsif Z = 1.0 then Pi / 4.0
- else Float_Type'Base (Aux.Atan (Double (Z))));
+ if abs Y > abs X then
+ Z := abs (X / Y);
+ else
+ Z := abs (Y / X);
+ end if;
+
+ if Z < Sqrt_Epsilon then
+ Raw_Atan := Z;
+ elsif Z = 1.0 then
+ Raw_Atan := Pi / 4.0;
+ else
+ Raw_Atan := Float_Type'Base (Aux.Atan (Double (Z)));
+ end if;
if abs Y > abs X then
Raw_Atan := Half_Pi - Raw_Atan;
diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb
index f56614ca7bd..a78b0d8f813 100644
--- a/gcc/ada/s-tassta.adb
+++ b/gcc/ada/s-tassta.adb
@@ -743,9 +743,7 @@ package body System.Tasking.Stages is
function State
(Int : System.Interrupt_Management.Interrupt_ID) return Character;
pragma Import (C, State, "__gnat_get_interrupt_state");
- -- Get interrupt state. Defined in a-init.c
- -- The input argument is the interrupt number,
- -- and the result is one of the following:
+ -- Get interrupt state for interrupt number Int. Defined in init.c
Default : constant Character := 's';
-- 's' Interrupt_State pragma set state to System (use "default"
OpenPOWER on IntegriCloud