tree checksum vpatch file split hunks
all signers: ave1
antecedents: zfp_2_noc zfp_genesis zfp_3_platform
press order:
zfp_genesis | ave1 |
zfp_1_examples | ave1 |
patch:
(6 . 9)(6 . 13)-
5
6 obj/start.o:adainclude/start.S
7 as -c $< -o $@
8
9 obj/memcpy.o:platform/linux-${PLATFORM}/memcpy.s
10 as -c $< -o $@
11
12 adalib/libgnat.a:adainclude/*.ads
13 adalib/libgnat.a:adainclude/*.ads adainclude/*.adb obj/memcpy.o
14 gprbuild -Xplatform=$(PLATFORM) -P $(PROJECT_FILE)
15 ar r adalib/libgnat.a obj/memcpy.o
16
17 install:adalib/libgnat.a
18 cp runtime-$(PLATFORM).xml runtime.xml
(17 . 4)(21 . 5)
20 clean:
21 gprclean -Xplatform=$(PLATFORM) -P $(PROJECT_FILE)
22 -rm -Rf obj/start.o
23 -rm -Rf obj/memcpy.o
24 -rm -f runtime.xml
(0 . 0)(1 . 59)
29 ------------------------------------------------------------------------------
30 -- --
31 -- GNAT RUN-TIME COMPONENTS --
32 -- --
33 -- A D A . A S S E R T --
34 -- --
35 -- B o d y --
36 -- --
37 -- Copyright (C) 2007-2015, Free Software Foundation, Inc. --
38 -- --
39 -- GNAT is free software; you can redistribute it and/or modify it under --
40 -- terms of the GNU General Public License as published by the Free Soft- --
41 -- ware Foundation; either version 3, or (at your option) any later ver- --
42 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
43 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
44 -- or FITNESS FOR A PARTICULAR PURPOSE. --
45 -- --
46 -- --
47 -- --
48 -- --
49 -- --
50 -- You should have received a copy of the GNU General Public License and --
51 -- a copy of the GCC Runtime Library Exception along with this program; --
52 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
53 -- <http://www.gnu.org/licenses/>. --
54 -- --
55 -- GNAT was originally developed by the GNAT team at New York University. --
56 -- Extensive contributions were provided by Ada Core Technologies Inc. --
57 -- --
58 ------------------------------------------------------------------------------
59
60 with System.Syscall; use System.Syscall;
61 with Ada.Text_IO; use Ada.Text_IO;
62
63 package body Ada.Assertions with
64 SPARK_Mode
65 is
66 ------------
67 -- Assert --
68 ------------
69
70 procedure Assert (Check : Boolean) is
71 begin
72 if Check = False then
73 Put("Assertion Failed" & ASCII.LF);
74 Sys_Exit(1);
75 end if;
76 end Assert;
77
78 procedure Assert (Check : Boolean; Message : String) is
79 begin
80 if Check = False then
81 Put("Assertion Failed:");
82 Put(Message);
83 Sys_Exit(1);
84 end if;
85 end Assert;
86
87 end Ada.Assertions;
-(0 . 0)(1 . 53)
92 ------------------------------------------------------------------------------
93 -- --
94 -- GNAT RUN-TIME COMPONENTS --
95 -- --
96 -- A D A . A S S E R T I O N S --
97 -- --
98 -- Copyright (C) 2015, Free Software Foundation, Inc. --
99 -- --
100 -- S p e c --
101 -- --
102 -- This specification is derived from the Ada Reference Manual for use with --
103 -- GNAT. The copyright notice above, and the license provisions that follow --
104 -- apply solely to the contracts that have been added. --
105 -- --
106 -- GNAT is free software; you can redistribute it and/or modify it under --
107 -- terms of the GNU General Public License as published by the Free Soft- --
108 -- ware Foundation; either version 3, or (at your option) any later ver- --
109 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
110 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
111 -- or FITNESS FOR A PARTICULAR PURPOSE. --
112 -- --
113 -- --
114 -- --
115 -- --
116 -- --
117 -- You should have received a copy of the GNU General Public License and --
118 -- a copy of the GCC Runtime Library Exception along with this program; --
119 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
120 -- <http://www.gnu.org/licenses/>. --
121 -- --
122 -- GNAT was originally developed by the GNAT team at New York University. --
123 -- Extensive contributions were provided by Ada Core Technologies Inc. --
124 -- --
125 ------------------------------------------------------------------------------
126
127 -- Preconditions in this unit are meant for analysis only, not for run-time
128 -- checking, so that the expected exceptions are raised when calling Assert.
129 -- This is enforced by setting the corresponding assertion policy to Ignore.
130
131 pragma Assertion_Policy (Pre => Ignore);
132
133 package Ada.Assertions with
134 SPARK_Mode
135 is
136 pragma Pure (Assertions);
137
138 procedure Assert (Check : Boolean) with
139 Pre => Check;
140
141 procedure Assert (Check : Boolean; Message : String) with
142 Pre => Check;
143
144 end Ada.Assertions;
- E3E315F1CC354ABADD811A6C37E3908B2C13BAA0E0C4F9756C7D7483803BCB13D1AB23ABD9CF4A5B2BBEB9A53FCF3AD36A66450DDCDBB383DC7D2AAFDFE0B026(13 . 6)(13 . 7)
149 ------------------------------------------------------------------------------
150
151 package Ada.Text_IO is
152 pragma Pure (Text_IO);
153
154 procedure Put (Item : Character);
155 -- Output character to the console
-(0 . 0)(1 . 51)
160 ------------------------------------------------------------------------------
161 -- --
162 -- GNAT RUN-TIME COMPONENTS --
163 -- --
164 -- S Y S T E M . A S S E R T I O N S --
165 -- --
166 -- B o d y --
167 -- --
168 -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
169 -- --
170 -- GNAT is free software; you can redistribute it and/or modify it under --
171 -- terms of the GNU General Public License as published by the Free Soft- --
172 -- ware Foundation; either version 3, or (at your option) any later ver- --
173 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
174 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
175 -- or FITNESS FOR A PARTICULAR PURPOSE. --
176 -- --
177 -- --
178 -- --
179 -- --
180 -- --
181 -- You should have received a copy of the GNU General Public License and --
182 -- a copy of the GCC Runtime Library Exception along with this program; --
183 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
184 -- <http://www.gnu.org/licenses/>. --
185 -- --
186 -- GNAT was originally developed by the GNAT team at New York University. --
187 -- Extensive contributions were provided by Ada Core Technologies Inc. --
188 -- --
189 ------------------------------------------------------------------------------
190
191 with System.Syscall; use System.Syscall;
192 with Ada.Text_IO; use Ada.Text_IO;
193
194 pragma Compiler_Unit_Warning;
195
196
197 package body System.Assertions is
198
199 --------------------------
200 -- Raise_Assert_Failure --
201 --------------------------
202
203 procedure Raise_Assert_Failure (Msg : String) is
204 begin
205 Put("Assertion Failed:");
206 Put(Msg);
207 Sys_Exit(1);
208 end Raise_Assert_Failure;
209
210 end System.Assertions;
-(0 . 0)(1 . 50)
215 ------------------------------------------------------------------------------
216 -- --
217 -- GNAT RUN-TIME COMPONENTS --
218 -- --
219 -- S Y S T E M . A S S E R T I O N S --
220 -- --
221 -- S p e c --
222 -- --
223 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
224 -- --
225 -- GNAT is free software; you can redistribute it and/or modify it under --
226 -- terms of the GNU General Public License as published by the Free Soft- --
227 -- ware Foundation; either version 3, or (at your option) any later ver- --
228 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
229 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
230 -- or FITNESS FOR A PARTICULAR PURPOSE. --
231 -- --
232 -- --
233 -- --
234 -- --
235 -- --
236 -- You should have received a copy of the GNU General Public License and --
237 -- a copy of the GCC Runtime Library Exception along with this program; --
238 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
239 -- <http://www.gnu.org/licenses/>. --
240 -- --
241 -- GNAT was originally developed by the GNAT team at New York University. --
242 -- Extensive contributions were provided by Ada Core Technologies Inc. --
243 -- --
244 ------------------------------------------------------------------------------
245
246 -- This package provides support for assertions (including pragma Assert,
247 -- pragma Debug, and Precondition/Postcondition/Predicate/Invariant aspects
248 -- and their corresponding pragmas).
249
250 -- This unit may be used directly from an application program by providing
251 -- an appropriate WITH, and the interface can be expected to remain stable.
252
253 pragma Compiler_Unit_Warning;
254
255 package System.Assertions is
256
257 Assert_Failure : exception;
258 -- Exception raised when assertion fails
259
260 procedure Raise_Assert_Failure (Msg : String);
261 pragma No_Return (Raise_Assert_Failure);
262 -- Called to raise Assert_Failure with given message
263
264 end System.Assertions;
-(0 . 0)(1 . 66)
269 ------------------------------------------------------------------------------
270 -- --
271 -- GNAT RUN-TIME COMPONENTS --
272 -- --
273 -- S Y S T E M . M E M O R Y _ C O M P A R E --
274 -- --
275 -- B o d y --
276 -- --
277 -- Copyright (C) 2006-2014, Free Software Foundation, Inc. --
278 -- --
279 -- GNAT is free software; you can redistribute it and/or modify it under --
280 -- terms of the GNU General Public License as published by the Free Soft- --
281 -- ware Foundation; either version 3, or (at your option) any later ver- --
282 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
283 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
284 -- or FITNESS FOR A PARTICULAR PURPOSE. --
285 -- --
286 -- --
287 -- --
288 -- --
289 -- --
290 -- You should have received a copy of the GNU General Public License and --
291 -- a copy of the GCC Runtime Library Exception along with this program; --
292 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
293 -- <http://www.gnu.org/licenses/>. --
294 -- --
295 -- GNAT was originally developed by the GNAT team at New York University. --
296 -- Extensive contributions were provided by Ada Core Technologies Inc. --
297 -- --
298 ------------------------------------------------------------------------------
299
300 with Ada.Unchecked_Conversion;
301 with Interfaces.C; use Interfaces.C;
302
303 package body System.Memory_Compare is
304
305 subtype mem is char_array (size_t);
306 type memptr is access mem;
307
308 function to_memptr is new Ada.Unchecked_Conversion (Address, memptr);
309
310 ------------
311 -- memcmp --
312 ------------
313
314 function memcmp (S1 : Address; S2 : Address; N : size_t) return int is
315 s1_p : constant memptr := to_memptr (S1);
316 s2_p : constant memptr := to_memptr (S2);
317
318 begin
319 if N = 0 then
320 return 0;
321 end if;
322
323 for J in 0 .. N - 1 loop
324 if s1_p (J) < s2_p (J) then
325 return -1;
326 elsif s1_p (J) > s2_p (J) then
327 return 1;
328 end if;
329 end loop;
330
331 return 0;
332 end memcmp;
333
334 end System.Memory_Compare;
-(0 . 0)(1 . 46)
339 ------------------------------------------------------------------------------
340 -- --
341 -- GNAT RUN-TIME COMPONENTS --
342 -- --
343 -- S Y S T E M . M E M O R Y _ C O M P A R E --
344 -- --
345 -- S p e c --
346 -- --
347 -- Copyright (C) 2006-2014, Free Software Foundation, Inc. --
348 -- --
349 -- GNAT is free software; you can redistribute it and/or modify it under --
350 -- terms of the GNU General Public License as published by the Free Soft- --
351 -- ware Foundation; either version 3, or (at your option) any later ver- --
352 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
353 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
354 -- or FITNESS FOR A PARTICULAR PURPOSE. --
355 -- --
356 -- --
357 -- --
358 -- --
359 -- --
360 -- You should have received a copy of the GNU General Public License and --
361 -- a copy of the GCC Runtime Library Exception along with this program; --
362 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
363 -- <http://www.gnu.org/licenses/>. --
364 -- --
365 -- GNAT was originally developed by the GNAT team at New York University. --
366 -- Extensive contributions were provided by Ada Core Technologies Inc. --
367 -- --
368 ------------------------------------------------------------------------------
369
370 with Interfaces.C;
371
372 package System.Memory_Compare is
373 pragma Preelaborate;
374
375 function memcmp
376 (S1 : Address;
377 S2 : Address;
378 N : Interfaces.C.size_t) return Interfaces.C.int;
379 pragma Export (C, memcmp, "memcmp");
380 -- Compares the first n bytes of the memory areas s1 and s2. It returns
381 -- an integer less than, equal to, or greater than zero if s1 is
382 -- found, respectively, to be less than, to match, or be greater than s2.
383
384 end System.Memory_Compare;
-(0 . 0)(1 . 25)
389 .global memcpy
390 .global __memcpy_fwd
391 .hidden __memcpy_fwd
392 .type memcpy,@function
393 memcpy:
394 __memcpy_fwd:
395 mov %rdi,%rax
396 cmp $8,%rdx
397 jc 1f
398 test $7,%edi
399 jz 1f
400 2: movsb
401 dec %rdx
402 test $7,%edi
403 jnz 2b
404 1: mov %rdx,%rcx
405 shr $3,%rcx
406 rep
407 movsq
408 and $7,%edx
409 jz 1f
410 2: movsb
411 dec %edx
412 jnz 2b
413 1: ret
- 602E857B2C3724B907CA3D6F4B1587D375C7E35F90AC7A23253EDAFF29187862D6FC2B2C104DA14706B16DB2F984EB335B4389C40E87407068D853CDBC0E6210(21 . 6)(21 . 7)- E87D5D4ECC1A2A9BED07371E36F4CA73C34E5781CFA4E3C5D159027F7C9468ACDDFADF8E59E8357A24CF22B1E8FF1148C660C6A09AAC40E43614C62137B822B8
418 Int'Asm_Input ("D", fd),
419 System.Address'Asm_Input ("S", B'Address),
420 Int'Asm_Input ("d", B'Length)),
421 Clobber => "rcx, r11",
422 Volatile => True);
423 if R < 0 and R >= -(2**12) then
424 E := ErrorCode'Val (-R);
(43 . 7)(44 . 8)
426 (Int'Asm_Input ("a", SYSCALL_READ),
427 Int'Asm_Input ("D", fd),
428 System.Address'Asm_Input ("S", B'Address),
429 Int'Asm_Input ("d", B'Length)));
430 Int'Asm_Input ("d", B'Length)),
431 Clobber => "rcx, r11, memory");
432 for I in S'Range loop
433 S (I) := Character'Val (B (I));
434 end loop;
(67 . 7)(69 . 7)
436 ASCII.HT & -- CODE
437 "syscall",
438 Inputs => (Int'Asm_Input ("g", Int (C))),
439 Clobber => "rax, rdi",
440 Clobber => "rax, rdi, rcx, r11",
441 Volatile => True);
442 raise Program_Error;
443 end Sys_Exit;
(1 . 4)(1 . 6)
448 package System.Syscall is
449 pragma Pure (Syscall);
450
451 -- All interaction with system calls use 4 64bit registers
452 -- These registers are interpreted as integers or pointers
453 type Int is range -2**63 .. (2**63 - 1);
- 88A32DE9B9A0DB4BC57E5039C996474ECC4206ED5654BD159401ADACD63A381D9472516489DC399B6A0A166972B762B62CBF68EC81BA072B37AF6C053CFFCC63(14 . 7)(14 . 7)
458
459 package Binder is
460 for Required_Switches ("Ada") use Binder'Required_Switches ("Ada") &
461 ("-nostdlib") ;
462 ("-nostdlib");
463 end Binder;
464 </config>
465 </configuration>