summaryrefslogtreecommitdiff
path: root/gcc/ada/s-arit64.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/s-arit64.adb')
-rw-r--r--gcc/ada/s-arit64.adb16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ada/s-arit64.adb b/gcc/ada/s-arit64.adb
index f4c8532ee3f..dff290ce85a 100644
--- a/gcc/ada/s-arit64.adb
+++ b/gcc/ada/s-arit64.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.16 $
+-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
@@ -325,14 +325,16 @@ package body System.Arith_64 is
T2 := Xhi * Ylo;
end if;
- else
- if Yhi /= 0 then
- T2 := Xlo * Yhi;
- else
- return X * Y;
- end if;
+ elsif Yhi /= 0 then
+ T2 := Xlo * Yhi;
+
+ else -- Yhi = Xhi = 0
+ T2 := 0;
end if;
+ -- Here we have T2 set to the contribution to the upper half
+ -- of the result from the upper halves of the input values.
+
T1 := Xlo * Ylo;
T2 := T2 + Hi (T1);