OSDN Git Service

Patch to fix -mcpu=G5 interface to EH runtime library.
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-carsi8.adb
index ebc86e7..9a6ea46 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---             Copyright (C) 2002 Free Software Foundation, Inc.            --
+--          Copyright (C) 2002-2004 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- --
@@ -31,6 +31,8 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
+with System.Address_Operations; use System.Address_Operations;
+
 with Unchecked_Conversion;
 
 package body System.Compare_Array_Signed_8 is
@@ -64,15 +66,14 @@ package body System.Compare_Array_Signed_8 is
      (Left      : System.Address;
       Right     : System.Address;
       Left_Len  : Natural;
-      Right_Len : Natural)
-      return      Integer
+      Right_Len : Natural) return Integer
    is
       Compare_Len : constant Natural := Natural'Min (Left_Len, Right_Len);
 
    begin
       --  If operands are non-aligned, or length is too short, go by bytes
 
-      if (((Left or Right) and 2#11#) /= 0) or else Compare_Len < 4 then
+      if ModA (OrA (Left, Right), 4) /= 0 or else Compare_Len < 4 then
          return Compare_Array_S8_Unaligned (Left, Right, Left_Len, Right_Len);
       end if;
 
@@ -88,15 +89,15 @@ package body System.Compare_Array_Signed_8 is
          for J in 0 .. Clen4 loop
             if LeftP (J) /= RightP (J) then
                return Compare_Array_S8_Unaligned
-                        (Left  + Address (4 * J),
-                         Right + Address (4 * J),
+                        (AddA (Left,  Address (4 * J)),
+                         AddA (Right, Address (4 * J)),
                          4, 4);
             end if;
          end loop;
 
          return Compare_Array_S8_Unaligned
-                  (Left      + Address (Clen4F),
-                   Right     + Address (Clen4F),
+                  (AddA (Left,  Address (Clen4F)),
+                   AddA (Right, Address (Clen4F)),
                    Left_Len  - Clen4F,
                    Right_Len - Clen4F);
       end;
@@ -110,8 +111,7 @@ package body System.Compare_Array_Signed_8 is
      (Left      : System.Address;
       Right     : System.Address;
       Left_Len  : Natural;
-      Right_Len : Natural)
-      return      Integer
+      Right_Len : Natural) return Integer
    is
       Compare_Len : constant Natural := Natural'Min (Left_Len, Right_Len);