summaryrefslogtreecommitdiffstats
path: root/all_pairs/source/ammunition
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2019-10-07 19:13:39 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2019-10-07 19:13:39 -0400
commit386b7d3366f1359a265da207a9cafa3edf553b64 (patch)
treec76120c2c138faed822e4ae386be6ef22a738a78 /all_pairs/source/ammunition
parent54a3f7091a2146b29c73a6fdc4b62a5c4ad7a3d8 (diff)
Reorganize and commit all the modified TACLeBench code and run scripts
Diffstat (limited to 'all_pairs/source/ammunition')
-rw-r--r--all_pairs/source/ammunition/ChangeLog.txt66
-rw-r--r--all_pairs/source/ammunition/README86
-rw-r--r--all_pairs/source/ammunition/ammunition.c1185
-rw-r--r--all_pairs/source/ammunition/ammunitionTimed.txt100
-rw-r--r--all_pairs/source/ammunition/ammunition_libc.c166
-rw-r--r--all_pairs/source/ammunition/ammunition_limits.h35
-rw-r--r--all_pairs/source/ammunition/ammunition_stdio.h8
-rw-r--r--all_pairs/source/ammunition/ammunition_stdlib.h6
-rw-r--r--all_pairs/source/ammunition/ammunition_string.h18
-rw-r--r--all_pairs/source/ammunition/arithm.c1384
-rw-r--r--all_pairs/source/ammunition/arithm.h123
-rw-r--r--all_pairs/source/ammunition/bits.c313
-rw-r--r--all_pairs/source/ammunition/bits.h60
-rw-r--r--all_pairs/source/ammunition/gmon.outbin0 -> 31048 bytes
-rw-r--r--all_pairs/source/ammunition/timeScript8
15 files changed, 3558 insertions, 0 deletions
diff --git a/all_pairs/source/ammunition/ChangeLog.txt b/all_pairs/source/ammunition/ChangeLog.txt
new file mode 100644
index 0000000..814ed86
--- /dev/null
+++ b/all_pairs/source/ammunition/ChangeLog.txt
@@ -0,0 +1,66 @@
1File: ammunition.c
2Original provenience: DINO programming language
3
42016-03-03:
5- Add generic TACLeBench header
6- Prefix global functions with benchmark name
7- Introduce volatile result variable for return statements
8- Split code into ammunition_init and ammunition_main
9- Fix compiler warnings "array subscript is of type 'char'":
10 char => unsigned char
11- Fix compiler warnings "'&&' within '||'":
12 Place additional parentheses
13- Remove usages and comments related to the macros
14 HAVE_MEMMOVE, NDEBUG, HAVE_MEMCMP
15- Remove comment related to unused NO_TEMPLATE macro
162016-05-02:
17- Change C++ style comments to ISO C90 compliant comments
18- Avoid mixing declarations and code: move declaration of variable writePos in
19 functions ammunition_sprintf_d and ammunition_sprintf_u
20- Change datatype in function ammunition_bits_test of iteration variables i and
21 j from int to unsigned int to avoid comparison between signed and unsigned
22 integer expressions
23- Add forward declarations to ammunition.c
24- Introduce variable ammunition_result
25- Parantheses around comparison in functions ammunition_isdigit and
26 ammunition_isspace
27- Remove usage of limits.h, move definitions of limits into separate file
28 ammunition_limits.h
29- Remove unconditional assignments of variable result to zero after each test in
30 functions ammunition_bits_test and ammunition_arithm_test
31- Remove unused functions unsigned_integer_maximum, integer_minimum,
32 integer_maximum, integer_remainder
33- Remove unused declaration of function default_arithmetic_overflow_reaction
34- Remove unused variables zero_constant_itself, zero_constant
35- Remove unused declarations of functions set_unsigned_integer_overflow_reaction
36 and set_integer_overflow_reaction
37- Remove block #ifndef MAX_INTEGER_OPERAND_SIZE, set definition of
38 MAX_INTEGER_OPERAND_SIZE to 128, since this is default
392016-05-10:
40- Integrate new version of arithm library from ammunition repository from
41 dino repository on github (commit: db9cfab042c332abb234ec8d72750103010981c1),
42 which hanles arithmetic shifts by negative numbers. This change now makes all
43 test cases in ammunition.c pass. Update headers unsigned int bits => int bits
44- Remove assert statements
45- Fix memcmp implementation: dereferencing pointer was missing
46- Add loop-bound annotation to memcmp
47- Fix strcmp implementation
48- Integrate working versions of memcpy and memset from pm benchmark
49- Update signature of ammunition_memcpy to original version:
50 void *memcpy(void *dest, const void *src, size_x n);
51- Move functions from libc into separate file, introduce header files
52 ammunition_limits.h, ammunition_stdio.h, ammunition_stdlib.h,
53 ammunition_string.h
54- Fix overflow in sprintf_d: change datatype of variable 'copyOfNumber' from int
55 to long, since the negative value of INT_MIN is undefined
56 2016-05-17:
57- Remove all static declarations of global functions
58- Rename variables 'digit_number' to digit_num to keep lines below 80 characters
59- Rename op1_digit_number to op1_digit_number and op1_digit_num in function
60 'ammunition_multiply_unsigned_integer_without_overflow_reaction'
61- Rename variable 'scaled_op1_digit_number' in function
62 'ammunition_divide_unsigned_integer_without_overflow_reaction'
63- Apply code formatting with astyle
64
652017-08-18:
66- Add explicit casts to silence g++ warnings.
diff --git a/all_pairs/source/ammunition/README b/all_pairs/source/ammunition/README
new file mode 100644
index 0000000..8caddf4
--- /dev/null
+++ b/all_pairs/source/ammunition/README
@@ -0,0 +1,86 @@
1This directory AMMUNITION contains reusable packages on C/C++:
2`allocate', `vlobject', `objstack', `hashtab', `commline', `ticker',
3`position', `errors', `bits', `arithm', `IEEE':
4 o allocate
5 Allocating and freeing memory with automatic fixing some
6 allocation errors.
7 o vlobject
8 Work with variable length objects (VLO). Any number of bytes
9 may be added to and removed from the end of VLO. If it is
10 needed the memory allocated for storing variable length object
11 may be expanded possibly with changing the object place. But
12 between any additions of the bytes (or tailoring) the object
13 place is not changed. To decrease number of changes of the
14 object place the memory being allocated for the object is
15 longer than the current object length.
16 o objstack
17 Work with stacks of objects (OS). Work with the object on the
18 stack top is analogous to one with a variable length object.
19 One motivation for the package is the problem of growing char
20 strings in symbol tables. Memory for OS is allocated by
21 segments. A segment may contain more one objects. The most
22 recently allocated segment contains object on the top of OS.
23 If there is not sufficient free memory for the top object than
24 new segment is created and the top object is transferred into
25 the new segment, i.e. there is not any memory reallocation.
26 Therefore the top object may change its address. But other
27 objects never change address.
28 o hashtab
29 Work with hash tables. The package permits to work
30 simultaneously with several expandable hash tables. Besides
31 insertion and search of elements the elements from the hash
32 tables can be also removed. The table element can be only a
33 pointer. The size of hash tables is not fixed. The hash
34 table will be automatically expanded when its occupancy will
35 became big.
36 o position
37 Work with source code positions. The package serves to
38 support information about source positions of compiled files
39 taking all included files into account.
40 o errors
41 Output of compiler messages. The package serves output
42 one-pass or multi-pass compiler messages of various modes
43 (errors, warnings, fatal, system errors and appended messages)
44 in Unix style or for traditional listing. The package also
45 permits adequate error reporting for included files.
46 o commline
47 Work with command line. The package implements features
48 analogous to ones of public domain function `getopt'. The
49 goal of the package creation is to use more readable language
50 of command line description and to use command line
51 description as help output of program.
52 o ticker
53 Simultaneous work with several tickers (timers).
54 o bits
55 Work with bit strings (copying, moving, setting, testing,
56 comparison).
57 o arithm
58 Implementing host machine-independently arbitrary precision
59 integer numbers arithmetic. The implementation of the package
60 functions are not sufficiently efficient in order to use for
61 run-time. The package functions are oriented to implement
62 constant-folding in compilers, cross-compilers.
63 o IEEE
64 Implementing host machine-independently IEEE floating point
65 arithmetic. The implementation of the package functions are
66 not sufficiently efficient in order to use for run-time. The
67 package functions are oriented to implement constant-folding
68 in compilers, cross-compilers.
69
70 There are files with corresponding names and extensions `.h'
71(interface file for C/C++), `.c' (implementation file on C), and
72`.cpp' (implementation file on C++).
73
74 To install AMMUNITION see file INSTALL in the current directory.
75
76 There are also shell scripts for testing the package with
77corresponding names and extension `.tst'. Documentation of the
78reusable packages is in files `ammunition.txt', `ammunition.dvi',
79`ammunition.ps', `ammunition.info*', `ammunition*.html',
80`ammunition*.rtf' for C and `ammunition++.txt', `ammunition++.dvi',
81`ammunition++.ps', `ammunition++.info*', `ammunition++*.html',
82`ammunition++*.rtf'.
83
84Please send bug reports and comments to vmakarov@fnmail.com
85
86Vladimir Makarov
diff --git a/all_pairs/source/ammunition/ammunition.c b/all_pairs/source/ammunition/ammunition.c
new file mode 100644
index 0000000..224babd
--- /dev/null
+++ b/all_pairs/source/ammunition/ammunition.c
@@ -0,0 +1,1185 @@
1/*
2
3 This program is part of the TACLeBench benchmark suite.
4 Version V 2.0
5
6 Name: ammunition
7
8 Author: Vladimir Makarov <vmakarov@gcc.gnu.org>