~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/2e/2eca7b07f979ef58425cf3a3578f5c716df9b190.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
gcc/
 
2
 
 
3
2013-03-23  Mikael Pettersson  <mikpe@it.uu.se>
 
4
 
 
5
        PR ada/48835
 
6
        * cse.c (fold_rtx) <case CC0>: If prev_insn_cc0 is NULL
 
7
        return the orginal expression x.
 
8
 
 
9
gcc/ada/
 
10
 
 
11
2011-10-12  Mikael Pettersson  <mikpe@it.uu.se>
 
12
 
 
13
        PR ada/48835
 
14
        * gcc-interface/Makefile.in: Add support for m68k-linux.
 
15
        * system-linux-m68k.ads: New file based on system-linux-ppc.ads
 
16
        and system-vxworks-m68k.ads.
 
17
        * s-memory.adb (Gnat_Malloc): New wrapper around Alloc, returning
 
18
        the memory address as a pointer not an integer.
 
19
        Add Gnat_Malloc -> __gnat_malloc export.
 
20
        * s-memory.ads: Remove Alloc -> __gnat_malloc export.
 
21
 
 
22
2012-01-28  Mikael Pettersson  <mikpe@it.uu.se>
 
23
 
 
24
        PR ada/51483
 
25
        * gcc-interface/misc.c (enumerate_modes): Pass both precision and
 
26
        bitsize to callback function.  Adjust prototype of callback function.
 
27
        gcc-interface/gigi.h (enumerate_modes): Likewise.
 
28
        back_end.ads (Register_Type_Proc): Likewise.
 
29
        cstand.adb (Register_Float_Type): Likewise.  Use given precision
 
30
        rather than deriving it incorrectly from size.
 
31
 
 
32
--- a/src/gcc/ada/gcc-interface/Makefile.in
 
33
+++ b/src/gcc/ada/gcc-interface/Makefile.in
 
34
@@ -1919,6 +1919,35 @@ ifeq ($(strip $(filter-out arm%-linux,$(
 
35
   LIBRARY_VERSION := $(LIB_VERSION)
 
36
 endif
 
37
 
 
38
+# m68k Linux
 
39
+ifeq ($(strip $(filter-out m68k% linux%,$(arch) $(osys))),)
 
40
+  LIBGNAT_TARGET_PAIRS = \
 
41
+  a-intnam.ads<a-intnam-linux.ads \
 
42
+  s-inmaop.adb<s-inmaop-posix.adb \
 
43
+  s-intman.adb<s-intman-posix.adb \
 
44
+  s-linux.ads<s-linux.ads \
 
45
+  s-osinte.adb<s-osinte-posix.adb \
 
46
+  s-osinte.ads<s-osinte-linux.ads \
 
47
+  s-osprim.adb<s-osprim-posix.adb \
 
48
+  s-taprop.adb<s-taprop-linux.adb \
 
49
+  s-tasinf.ads<s-tasinf-linux.ads \
 
50
+  s-tasinf.adb<s-tasinf-linux.adb \
 
51
+  s-taspri.ads<s-taspri-posix-noaltstack.ads \
 
52
+  s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
 
53
+  system.ads<system-linux-m68k.ads
 
54
+
 
55
+  TOOLS_TARGET_PAIRS =  \
 
56
+    mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
 
57
+    indepsw.adb<indepsw-gnu.adb
 
58
+
 
59
+  EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
 
60
+  EH_MECHANISM=-gcc
 
61
+  THREADSLIB = -lpthread
 
62
+  GNATLIB_SHARED = gnatlib-shared-dual
 
63
+  GMEM_LIB = gmemlib
 
64
+  LIBRARY_VERSION := $(LIB_VERSION)
 
65
+endif
 
66
+
 
67
 # Sparc Linux
 
68
 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
 
69
   LIBGNAT_TARGET_PAIRS_COMMON = \
 
70
--- a/src/gcc/ada/s-memory.adb
 
71
+++ b/src/gcc/ada/s-memory.adb
 
72
@@ -47,6 +47,7 @@ with Ada.Exceptions;
 
73
 with System.Soft_Links;
 
74
 with System.Parameters;
 
75
 with System.CRTL;
 
76
+with Ada.Unchecked_Conversion;
 
77
 
 
78
 package body System.Memory is
 
79
 
 
80
@@ -100,6 +101,22 @@ package body System.Memory is
 
81
       return Result;
 
82
    end Alloc;
 
83
 
 
84
+   type Char_Ptr is access all Character;
 
85
+   pragma Convention (C, Char_Ptr);
 
86
+   pragma No_Strict_Aliasing (Char_Ptr);
 
87
+
 
88
+   function To_Char_Ptr is
 
89
+      new Ada.Unchecked_Conversion (System.Address, Char_Ptr);
 
90
+
 
91
+   --  The function exported as __gnat_malloc MUST return a pointer type.
 
92
+   function Gnat_Malloc (Size : size_t) return Char_Ptr;
 
93
+   pragma Export (C, Gnat_Malloc, "__gnat_malloc");
 
94
+
 
95
+   function Gnat_Malloc (Size : size_t) return Char_Ptr is
 
96
+   begin
 
97
+      return To_Char_Ptr (Alloc (Size));
 
98
+   end Gnat_Malloc;
 
99
+
 
100
    ----------
 
101
    -- Free --
 
102
    ----------
 
103
--- a/src/gcc/ada/s-memory.ads
 
104
+++ b/src/gcc/ada/s-memory.ads
 
105
@@ -100,7 +100,6 @@ private
 
106
 
 
107
    --  The following names are used from the generated compiler code
 
108
 
 
109
-   pragma Export (C, Alloc,   "__gnat_malloc");
 
110
    pragma Export (C, Free,    "__gnat_free");
 
111
    pragma Export (C, Realloc, "__gnat_realloc");
 
112
 
 
113
--- /dev/null
 
114
+++ b/src/gcc/ada/system-linux-m68k.ads
 
115
@@ -0,0 +1,153 @@
 
116
+------------------------------------------------------------------------------
 
117
+--                                                                          --
 
118
+--                        GNAT RUN-TIME COMPONENTS                          --
 
119
+--                                                                          --
 
120
+--                               S Y S T E M                                --
 
121
+--                                                                          --
 
122
+--                                 S p e c                                  --
 
123
+--                         (GNU-Linux/M68K Version)                         --
 
124
+--                                                                          --
 
125
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 
126
+--                                                                          --
 
127
+-- This specification is derived from the Ada Reference Manual for use with --
 
128
+-- GNAT. The copyright notice above, and the license provisions that follow --
 
129
+-- apply solely to the  contents of the part following the private keyword. --
 
130
+--                                                                          --
 
131
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
 
132
+-- terms of the  GNU General Public License as published  by the Free Soft- --
 
133
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
 
134
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
 
135
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
 
136
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
 
137
+--                                                                          --
 
138
+-- As a special exception under Section 7 of GPL version 3, you are granted --
 
139
+-- additional permissions described in the GCC Runtime Library Exception,   --
 
140
+-- version 3.1, as published by the Free Software Foundation.               --
 
141
+--                                                                          --
 
142
+-- You should have received a copy of the GNU General Public License and    --
 
143
+-- a copy of the GCC Runtime Library Exception along with this program;     --
 
144
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
 
145
+-- <http://www.gnu.org/licenses/>.                                          --
 
146
+--                                                                          --
 
147
+-- GNAT was originally developed  by the GNAT team at  New York University. --
 
148
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 
149
+--                                                                          --
 
150
+------------------------------------------------------------------------------
 
151
+
 
152
+package System is
 
153
+   pragma Pure;
 
154
+   --  Note that we take advantage of the implementation permission to make
 
155
+   --  this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
 
156
+   --  2005, this is Pure in any case (AI-362).
 
157
+
 
158
+   type Name is (SYSTEM_NAME_GNAT);
 
159
+   System_Name : constant Name := SYSTEM_NAME_GNAT;
 
160
+
 
161
+   --  System-Dependent Named Numbers
 
162
+
 
163
+   Min_Int               : constant := Long_Long_Integer'First;
 
164
+   Max_Int               : constant := Long_Long_Integer'Last;
 
165
+
 
166
+   Max_Binary_Modulus    : constant := 2 ** Long_Long_Integer'Size;
 
167
+   Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
 
168
+
 
169
+   Max_Base_Digits       : constant := Long_Long_Float'Digits;
 
170
+   Max_Digits            : constant := Long_Long_Float'Digits;
 
171
+
 
172
+   Max_Mantissa          : constant := 63;
 
173
+   Fine_Delta            : constant := 2.0 ** (-Max_Mantissa);
 
174
+
 
175
+   Tick                  : constant := 0.000_001;
 
176
+
 
177
+   --  Storage-related Declarations
 
178
+
 
179
+   type Address is private;
 
180
+   pragma Preelaborable_Initialization (Address);
 
181
+   Null_Address : constant Address;
 
182
+
 
183
+   Storage_Unit : constant := 8;
 
184
+   Word_Size    : constant := 32;
 
185
+   Memory_Size  : constant := 2 ** 32;
 
186
+
 
187
+   --  Address comparison
 
188
+
 
189
+   function "<"  (Left, Right : Address) return Boolean;
 
190
+   function "<=" (Left, Right : Address) return Boolean;
 
191
+   function ">"  (Left, Right : Address) return Boolean;
 
192
+   function ">=" (Left, Right : Address) return Boolean;
 
193
+   function "="  (Left, Right : Address) return Boolean;
 
194
+
 
195
+   pragma Import (Intrinsic, "<");
 
196
+   pragma Import (Intrinsic, "<=");
 
197
+   pragma Import (Intrinsic, ">");
 
198
+   pragma Import (Intrinsic, ">=");
 
199
+   pragma Import (Intrinsic, "=");
 
200
+
 
201
+   --  Other System-Dependent Declarations
 
202
+
 
203
+   type Bit_Order is (High_Order_First, Low_Order_First);
 
204
+   Default_Bit_Order : constant Bit_Order := High_Order_First;
 
205
+   pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
 
206
+
 
207
+   --  Priority-related Declarations (RM D.1)
 
208
+
 
209
+   --  0 .. 98 corresponds to the system priority range 1 .. 99.
 
210
+   --
 
211
+   --  If the scheduling policy is SCHED_FIFO or SCHED_RR the runtime makes use
 
212
+   --  of the entire range provided by the system.
 
213
+   --
 
214
+   --  If the scheduling policy is SCHED_OTHER the only valid system priority
 
215
+   --  is 1 and other values are simply ignored.
 
216
+
 
217
+   Max_Priority           : constant Positive := 97;
 
218
+   Max_Interrupt_Priority : constant Positive := 98;
 
219
+
 
220
+   subtype Any_Priority       is Integer      range  0 .. 98;
 
221
+   subtype Priority           is Any_Priority range  0 .. 97;
 
222
+   subtype Interrupt_Priority is Any_Priority range 98 .. 98;
 
223
+
 
224
+   Default_Priority : constant Priority := 48;
 
225
+
 
226
+private
 
227
+
 
228
+   type Address is mod Memory_Size;
 
229
+   Null_Address : constant Address := 0;
 
230
+
 
231
+   --------------------------------------
 
232
+   -- System Implementation Parameters --
 
233
+   --------------------------------------
 
234
+
 
235
+   --  These parameters provide information about the target that is used
 
236
+   --  by the compiler. They are in the private part of System, where they
 
237
+   --  can be accessed using the special circuitry in the Targparm unit
 
238
+   --  whose source should be consulted for more detailed descriptions
 
239
+   --  of the individual switch values.
 
240
+
 
241
+   Backend_Divide_Checks     : constant Boolean := False;
 
242
+   Backend_Overflow_Checks   : constant Boolean := True;
 
243
+   Command_Line_Args         : constant Boolean := True;
 
244
+   Configurable_Run_Time     : constant Boolean := False;
 
245
+   Denorm                    : constant Boolean := True;
 
246
+   Duration_32_Bits          : constant Boolean := False;
 
247
+   Exit_Status_Supported     : constant Boolean := True;
 
248
+   Fractional_Fixed_Ops      : constant Boolean := False;
 
249
+   Frontend_Layout           : constant Boolean := False;
 
250
+   Machine_Overflows         : constant Boolean := False;
 
251
+   Machine_Rounds            : constant Boolean := True;
 
252
+   Preallocated_Stacks       : constant Boolean := False;
 
253
+   Signed_Zeros              : constant Boolean := False;
 
254
+   Stack_Check_Default       : constant Boolean := False;
 
255
+   Stack_Check_Probes        : constant Boolean := False;
 
256
+   Stack_Check_Limits        : constant Boolean := False;
 
257
+   Support_64_Bit_Divides    : constant Boolean := True;
 
258
+   Support_Aggregates        : constant Boolean := True;
 
259
+   Support_Composite_Assign  : constant Boolean := True;
 
260
+   Support_Composite_Compare : constant Boolean := True;
 
261
+   Support_Long_Shifts       : constant Boolean := True;
 
262
+   Always_Compatible_Rep     : constant Boolean := True;
 
263
+   Suppress_Standard_Library : constant Boolean := False;
 
264
+   Use_Ada_Main_Program_Name : constant Boolean := False;
 
265
+   ZCX_By_Default            : constant Boolean := True;
 
266
+   GCC_ZCX_Support           : constant Boolean := True;
 
267
+
 
268
+end System;
 
269
--- a/src/gcc/cse.c
 
270
+++ b/src/gcc/cse.c
 
271
@@ -3137,6 +3137,8 @@ fold_rtx (rtx x, rtx insn)
 
272
 
 
273
 #ifdef HAVE_cc0
 
274
     case CC0:
 
275
+      if (! prev_insn_cc0)
 
276
+       return x;
 
277
       return prev_insn_cc0;
 
278
 #endif
 
279
 
 
280
--- a/src/gcc/ada/back_end.ads
 
281
+++ b/src/gcc/ada/back_end.ads
 
282
@@ -55,6 +55,7 @@ package Back_End is
 
283
       Complex   : Boolean;  -- True iff type has real and imaginary parts
 
284
       Count     : Natural;  -- Number of elements in vector, 0 otherwise
 
285
       Float_Rep : Float_Rep_Kind; -- Representation used for fpt type
 
286
+      Prec      : Positive; -- Precision in bits
 
287
       Size      : Positive; -- Size of representation in bits
 
288
       Alignment : Natural); -- Required alignment in bits
 
289
    pragma Convention (C, Register_Type_Proc);
 
290
--- a/src/gcc/ada/cstand.adb
 
291
+++ b/src/gcc/ada/cstand.adb
 
292
@@ -151,6 +151,7 @@ package body CStand is
 
293
       Complex   : Boolean;  -- True iff type has real and imaginary parts
 
294
       Count     : Natural;  -- Number of elements in vector, 0 otherwise
 
295
       Float_Rep : Float_Rep_Kind; -- Representation used for fpt type
 
296
+      Prec      : Positive; -- Precision in bits
 
297
       Size      : Positive; -- Size of representation in bits
 
298
       Alignment : Natural); -- Required alignment in bits
 
299
    pragma Convention (C, Register_Float_Type);
 
300
@@ -2014,6 +2015,7 @@ package body CStand is
 
301
       Complex   : Boolean;
 
302
       Count     : Natural;
 
303
       Float_Rep : Float_Rep_Kind;
 
304
+      Prec      : Positive;
 
305
       Size      : Positive;
 
306
       Alignment : Natural)
 
307
    is
 
308
@@ -2063,7 +2065,7 @@ package body CStand is
 
309
 
 
310
          else
 
311
             Write_Str ("mod 2**");
 
312
-            Write_Int (Int (Size / Positive'Max (1, Count)));
 
313
+            Write_Int (Int (Prec / Positive'Max (1, Count)));
 
314
             Write_Line (";");
 
315
          end if;
 
316
 
 
317
@@ -2100,7 +2102,7 @@ package body CStand is
 
318
             Make_Name (Ent, T (1 .. Last));
 
319
             Set_Scope (Ent, Standard_Standard);
 
320
             Build_Float_Type (Ent, Esize, Float_Rep, Pos (Digs));
 
321
-            Set_RM_Size (Ent, UI_From_Int (Int (Size)));
 
322
+            Set_RM_Size (Ent, UI_From_Int (Int (Prec)));
 
323
             Set_Alignment (Ent, UI_From_Int (Int (Alignment / 8)));
 
324
 
 
325
             if No (Back_End_Float_Types) then
 
326
--- a/src/gcc/ada/gcc-interface/gigi.h
 
327
+++ b/src/gcc/ada/gcc-interface/gigi.h
 
328
@@ -1014,7 +1014,7 @@ extern Nat get_target_double_scalar_alig
 
329
 /* This function is called by the front-end to enumerate all the supported
 
330
    modes for the machine, as well as some predefined C types.  */
 
331
 extern void enumerate_modes (void (*f) (const char *, int, int, int, int, int,
 
332
-                                       int));
 
333
+                                       int, int));
 
334
 
 
335
 #ifdef __cplusplus
 
336
 }
 
337
--- a/src/gcc/ada/gcc-interface/misc.c
 
338
+++ b/src/gcc/ada/gcc-interface/misc.c
 
339
@@ -664,11 +664,12 @@ must_pass_by_ref (tree gnu_type)
 
340
    COMPLEX_P   nonzero is this represents a complex mode
 
341
    COUNT       count of number of items, nonzero for vector mode
 
342
    FLOAT_REP   Float_Rep_Kind for FP, otherwise undefined
 
343
+   PREC                number of bits of precision
 
344
    SIZE                number of bits used to store data
 
345
    ALIGN       number of bits to which mode is aligned.  */
 
346
 
 
347
 void
 
348
-enumerate_modes (void (*f) (const char *, int, int, int, int, int, int))
 
349
+enumerate_modes (void (*f) (const char *, int, int, int, int, int, int, int))
 
350
 {
 
351
   const tree c_types[]
 
352
     = { float_type_node, double_type_node, long_double_type_node };
 
353
@@ -751,9 +752,11 @@ enumerate_modes (void (*f) (const char *
 
354
 
 
355
            if (TYPE_MODE (typ) == i)
 
356
              {
 
357
+               int prec = TYPE_PRECISION (typ);
 
358
+               int size = float_p ? fp_prec_to_size (prec) : prec;
 
359
                f (nam, digs, complex_p,
 
360
                   vector_p ? GET_MODE_NUNITS (i) : 0, float_rep,
 
361
-                  TYPE_PRECISION (typ), TYPE_ALIGN (typ));
 
362
+                  prec, size, TYPE_ALIGN (typ));
 
363
                skip_p = true;
 
364
              }
 
365
          }
 
366
@@ -763,7 +766,7 @@ enumerate_modes (void (*f) (const char *
 
367
       if (!skip_p)
 
368
        f (GET_MODE_NAME (i), digs, complex_p,
 
369
           vector_p ? GET_MODE_NUNITS (i) : 0, float_rep,
 
370
-          GET_MODE_PRECISION (i), GET_MODE_ALIGNMENT (i));
 
371
+          GET_MODE_PRECISION (i), GET_MODE_BITSIZE (i), GET_MODE_ALIGNMENT (i));
 
372
     }
 
373
 }
 
374