diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-13 08:39:28 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-13 08:39:28 +0000 |
commit | 7f2cf564eba680b23a70b5a610426d6a993a7f4a (patch) | |
tree | 164176c7f48023bea63ede90147c01010044b3fa /gcc/ada/s-arit64.adb | |
parent | 91a6416d693639c33d0b59006a77f8cd81949337 (diff) | |
download | gcc-7f2cf564eba680b23a70b5a610426d6a993a7f4a.tar.gz |
2009-07-13 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: The gnatf switch no longer is needed to get full
details on unsupported constructs.
* rtsfind.adb: Remove references to All_Errors_Mode, give errors
unconditionally.
* s-trafor-default.adb: Correct some warnings
* s-valwch.adb, a-calend.adb, freeze.adb, prj.ads, s-vmexta.adb,
sem.adb, sem_ch10.adb, sem_ch6.adb, sem_disp.adb, vxaddr2line.adb:
Minor reformatting.
* par-ch4.adb (Conditional_Expression): Capture proper location for
conditional expression, should point to IF.
* s-tassta.adb, a-wtdeau.adb, s-tasren.adb, s-arit64.adb, s-imgdec.adb,
s-direio.adb, s-tpobop.adb, g-socket.adb, s-tposen.adb, s-taskin.adb,
g-calend.adb, s-regpat.adb, s-scaval.adb, g-catiio.adb: Minor code
reorganization (use conditional expressions).
2009-07-13 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Remove_Side_Effects): If the expression is a call to a
build-in-place function that returns an inherently limited type (not
just a task type) create proper object declaration so that extra
build-in-place actuals are properly added to the call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-arit64.adb')
-rw-r--r-- | gcc/ada/s-arit64.adb | 46 |
1 files changed, 9 insertions, 37 deletions
diff --git a/gcc/ada/s-arit64.adb b/gcc/ada/s-arit64.adb index 2d18b8833bd..b6f253585c1 100644 --- a/gcc/ada/s-arit64.adb +++ b/gcc/ada/s-arit64.adb @@ -211,11 +211,7 @@ package body System.Arith_64 is end if; else - if Zhi /= 0 then - T2 := Ylo * Zhi; - else - T2 := 0; - end if; + T2 := (if Zhi /= 0 then Ylo * Zhi else 0); end if; T1 := Ylo * Zlo; @@ -254,23 +250,13 @@ package body System.Arith_64 is if X >= 0 then R := To_Int (Ru); - - if Den_Pos then - Q := To_Int (Qu); - else - Q := -To_Int (Qu); - end if; + Q := (if Den_Pos then To_Int (Qu) else -To_Int (Qu)); -- Case of dividend (X) sign negative else R := -To_Int (Ru); - - if Den_Pos then - Q := -To_Int (Qu); - else - Q := To_Int (Qu); - end if; + Q := (if Den_Pos then -To_Int (Qu) else To_Int (Qu)); end if; end Double_Divide; @@ -548,11 +534,9 @@ package body System.Arith_64 is -- which ensured the first bit of the divisor is set, this gives -- an estimate of the quotient that is at most two too high. - if D (J + 1) = Zhi then - Qd (J + 1) := 2 ** 32 - 1; - else - Qd (J + 1) := Lo ((D (J + 1) & D (J + 2)) / Zhi); - end if; + Qd (J + 1) := (if D (J + 1) = Zhi + then 2 ** 32 - 1 + else Lo ((D (J + 1) & D (J + 2)) / Zhi)); -- Compute amount to subtract @@ -598,27 +582,15 @@ package body System.Arith_64 is -- Case of dividend (X * Y) sign positive - if (X >= 0 and then Y >= 0) - or else (X < 0 and then Y < 0) - then + if (X >= 0 and then Y >= 0) or else (X < 0 and then Y < 0) then R := To_Pos_Int (Ru); - - if Z > 0 then - Q := To_Pos_Int (Qu); - else - Q := To_Neg_Int (Qu); - end if; + Q := (if Z > 0 then To_Pos_Int (Qu) else To_Neg_Int (Qu)); -- Case of dividend (X * Y) sign negative else R := To_Neg_Int (Ru); - - if Z > 0 then - Q := To_Neg_Int (Qu); - else - Q := To_Pos_Int (Qu); - end if; + Q := (if Z > 0 then To_Neg_Int (Qu) else To_Pos_Int (Qu)); end if; end Scaled_Divide; |