-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathChangeLog
More file actions
9438 lines (8495 loc) · 369 KB
/
ChangeLog
File metadata and controls
9438 lines (8495 loc) · 369 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2019-04-27 Jeremy Bennett <jeremy.bennett@embecosm.com>
This is a huge rewrite to get scaling pushed correctly into every
benchmark. In the process we have also done the following:
- Removed symbolic links to shared code. These just cause issues
on other platforms.
- Remove the src/template directory. It appears in the benchmark
results and adds nothing useful for the user.
- Added working verify_benchmark code to all benchmarks.
- Corrected assorted bugs, particularly where it is assumed that
int is 32-bits long.
- Moved BEEBS versions of malloc, rand etc into a library in the
main support directory.
All benchmarks are now scaled, so that on a RI5CY processor with
-O2 GCC, they all take around 4 million cycles with a board
REPEAT_FACTOR of 1.
* config/riscv32/boards/ri5cyverilator/boardsupport.h: Change
BOARD_REPEAT_FACTOR to 1.
* configure: Regenerated.
* configure.ac: Allow USER_CFLAGS and USER_LDFLAGS to be
configured, remote Makefiles for src/ctl, src/matmult,
src/sglib-arraysort, src/template and src/trio directories.
* src/Makefile.am: Remove ctl, matmul, sglib-arraysort, template
and trio SUBDIRS
* src/Makefile.in:
Regenerated.
* src/aha-compress/Makefile.am: LDADD libbeebs.
* src/aha-compress/Makefile.in: Regenerated.
* src/aha-compress/compress_test.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/aha-mont64/Makefile.am: LDADD libbeebs.
* src/aha-mont64/Makefile.in: Regenerated.
* src/aha-mont64/mont64.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Clean up return calculation.
* src/bs/Makefile.am: LDADD libbeebs.
* src/bs/Makefile.in: Regenerated.
* src/bs/libbs.c: Include string.h, change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value, define NUMVALS.
(DATA): Increase size of dataset
(binary_search): Parameterize range.
(verify_benchmark): Verify all result values using memcmp.
(benchmark): Rewrite to make 5 calls to search, repeat according
to LOCAL_SCALE_FACTOR and REPEAT_FACTOR.
* src/bubblesort/Makefile.am: LDADD libbeebs.
* src/bubblesort/Makefile.in: Regenerated.
* src/bubblesort/libbubblesort.c: Include string.h, change
SCALE_FACTOR to LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, incorporate array initialization into the loop.
(initialise_benchmark): Move initialization into main benchmark
loop.
(verify_benchmark): Clean up array and test result using memcmp.
* src/cnt/Makefile.am: LDADD libbeebs.
* src/cnt/Makefile.in: Regenerated.
* src/cnt/cnt.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, add initialization into the loop and remove
verification from this function.
(InitSeed, RandomInteger): Make Seed long int, and update
constants with L suffix.
(initialize_benchmark): Move initialization into main benchmark
loop.
(verify_benchmark): Tidy up code.
* src/compress/Makefile.am: LDADD libbeebs.
* src/compress/Makefile.in: Regenerated.
* src/compress/libcompress.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/cover/Makefile.am: LDADD libbeebs.
* src/cover/Makefile.in: Regenerated.
* src/cover/libcover.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Tidy up.
* src/crc/Makefile.am: LDADD libbeebs.
* src/crc/Makefile.in: Regenerated.
* src/crc/libcrc.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, return result for verification.
* src/crc32/Makefile.am: LDADD libbeebs.
* src/crc32/Makefile.in: Regenerated.
* src/crc32/crc_32.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(rand_beebs): Deleted.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, return a result which fits in a 16-bit int.
(verify_benchmark): Simplify and use 16-bit value.
* src/ctl-stack/Makefile.am: LDADD libbeebs.
* src/ctl-stack/Makefile.in: Regenerated.
* src/ctl-stack/ctl.c: Change to actual file instead of symbolic
link.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify-benchmark): Tidy up and check memory not blown up.
* src/ctl-stack/ctl.h: Change to actual file instead of symbolic
link.
* src/ctl-stack/stack.h: Change to actual file instead of symbolic
link.
* src/ctl-string/Makefile.am: LDADD libbeebs.
* src/ctl-string/Makefile.in: Regenerated.
* src/ctl-string/string.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, include initialization code in the loop.
(initialize_benchmark): Move in to main benchmark function.
(verify_benchmark): Simplify and check memory usage.
* src/ctl-vector/Makefile.am: LDADD libbeebs.
* src/ctl-vector/Makefile.in: Regenerated.
* src/ctl-vector/ctl.c:: Change to actual file instead of symbolic
link.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(initialize_benchmark): Move in to main benchmark function.
(verify_benchmark): Simplify and check memory usage.
* src/ctl-vector/ctl.h:: Change to actual file instead of symbolic
link.
* src/ctl-vector/vector.h: Change to actual file instead of
symbolic link.
* src/ctl/.gitignore: Deleted.
* src/ctl/Makefile.am: Deleted.
* src/ctl/Makefile.in: Deleted.
* src/ctl/ctl.c: Deleted.
* src/ctl/ctl.h: Deleted.
* src/ctl/stack.h: Deleted.
* src/ctl/vector.h: Deleted.
* src/cubic/Makefile.am: LDADD libbeebs.
* src/cubic/Makefile.in: Regenerated.
* src/cubic/basicmath_small.c: Include string.h, change
SCALE_FACTOR to LOCAL_SCALE_FACTOR and update value, add static
variables at top level to capture results for verification.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, capture results for verification.
* src/cubic/libcubic.c (void SolveCubic): Correct type casting
throughout.
* src/dijkstra/Makefile.am: LDADD libbeebs.
* src/dijkstra/Makefile.in: Regenerated.
* src/dijkstra/dijkstra_small.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/dtoa/Makefile.am: LDADD libbeebs.
* src/dtoa/Makefile.in: Regenerated.
* src/dtoa/libdtoa.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(initialise_benchmark): Contents moved into main benchmark
function.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify and check memory usage.
* src/duff/Makefile.am: LDADD libbeebs.
* src/duff/Makefile.in: Regenerated.
* src/duff/libduff.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value, get rid of superfluous blank lines throughout.
(initialise_benchmark): Contents moved into main benchmark
function.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/edn/Makefile.am: LDADD libbeebs.
* src/edn/Makefile.in: Regenerated.
* src/edn/libedn.c: Include string.h, change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, move initialization into loop.
(verify_benchmark): Tidy up and use memcmp to test vector.
* src/expint/Makefile.am: LDADD libbeebs.
* src/expint/Makefile.in: Regenerated.
* src/expint/libexpint.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, move initialization code into loop.
(initialise_benchmark): Contents moved into main benchmark
function.
(verify_benchmark): Simplify.
* src/fac/Makefile.am: LDADD libbeebs.
* src/fac/Makefile.in: Regenerated.
* src/fac/libfac.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value.
(fac): Make return type long int, so works for 16-bit int.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/fasta/Makefile.am: LDADD libbeebs.
* src/fasta/Makefile.in: Regenerated.
* src/fasta/libfasta.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(accumulate_probabilities): Change to write from input genelist to
output genelist, copying content as well as probability.
(repeat_fasta): Record result in repeat_res;
(random_fasta): Clean up code.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, reworking so result can be verified.
* src/fdct/Makefile.am: LDADD libbeebs.
* src/fdct/Makefile.in: Regenerated.
* src/fdct/libfdct.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/fibcall/Makefile.am: LDADD libbeebs.
* src/fibcall/Makefile.in: Regenerated.
* src/fibcall/libfibcall.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/fir/Makefile.am: LDADD libbeebs.
* src/fir/Makefile.in: Regenerated.
* src/fir/libfir.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/frac/Makefile.am: LDADD libbeebs.
* src/frac/Makefile.in: Regenerated.
* src/frac/libfrac.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(frac): Change to use long int args, so works for 16-bit ints.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, return result which works for 16-bit ints.
(verify_benchmark): Change to work for 16-bit ints.
* src/huffbench/Makefile.am: LDADD libbeebs.
* src/huffbench/Makefile.in: Regenerated.
* src/huffbench/libhuffbench.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(TEST_SiZE): Change to #define, so can be used to size arrays.
(verify_benchmark): Create version which actually verifies.
(initialise_benchmark): Contents moved into main benchmark
function.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, do initialization in loop, capture data for
verification.
* src/insertsort/Makefile.am: LDADD libbeebs.
* src/insertsort/Makefile.in: Regenerated.
* src/insertsort/libinsertsort.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, move initialization into loop and simplify using
memcpy.
(initialise_benchmark): Contents moved into main benchmark
function.
(verify_benchmark): Simplify using memcpy.
* src/janne_complex/Makefile.am: LDADD libbeebs.
* src/janne_complex/Makefile.in: Regenerated.
* src/janne_complex/libjanne_complex.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, move initialization into loop and simplify using
memcpy.
(initialise_benchmark): Contents moved into main benchmark
function.
(verify_benchmark): Simplify.
* src/jfdctint/Makefile.am: LDADD libbeebs.
* src/jfdctint/Makefile.in: Regenerated.
* src/jfdctint/libjfdctint.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value, include string.h and
stdint.h, correctly define type for DCTELEM and INT32, so both are
always 32-bits.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, move initialization into loop and simplify using
memcpy.
(initialise_benchmark): Contents moved into main benchmark
function.
(verify_benchmark): Simplify using memcpy.
* src/lcdnum/Makefile.am: LDADD libbeebs.
* src/lcdnum/Makefile.in: Regenerated.
* src/lcdnum/liblcdnum.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(out_vals): Created to capture results.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR and capture results for verification.
* src/levenshtein/Makefile.am: LDADD libbeebs.
* src/levenshtein/Makefile.in: Regenerated.
* src/levenshtein/liblevenshtein.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/ludcmp/Makefile.am: LDADD libbeebs.
* src/ludcmp/Makefile.in: Regenerated.
* src/ludcmp/libludcmp.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Tidy up.
* src/matmult-float/Makefile.am: LDADD libbeebs.
* src/matmult-float/Makefile.in: Regenerated.
* src/matmult-float/matmult-float.c: Replace symbolic link to
matmult.c and rename, change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify using memcpy.
* src/matmult-float/matmult.c: Symbolic link deleted.
* src/matmult-int/Makefile.am: LDADD libbeebs.
* src/matmult-int/Makefile.in: Regenerated.
* src/matmult-int/matmult-int.c: Replace symbolic link to
matmult.c and rename, change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify using memcpy.
* src/matmult/.gitignore: Deleted.
* src/matmult/Makefile.am: Deleted.
* src/matmult/Makefile.in: Deleted.
* src/matmult/matmult.c: Deleted.
* src/mergesort/Makefile.am: LDADD libbeebs.
* src/mergesort/Makefile.in: Regenerated.
* src/mergesort/libmergesort.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(rand_beebs): Deleted.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, correct function table to use addresses.
(verify_benchmark): Simplify using memcpy.
* src/miniz/Makefile.am: LDADD libbeebs.
* src/miniz/Makefile.in: Regenerated.
* src/miniz/miniz.c: Include beebsc.h
(init_heap, malloc_beebs, realloc_beebs, free_beebs): Deleted.
* src/miniz/miniz_b.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(verify_benchmark): Create version which at least checks for heap
overflow.
(benchmark): Repeat set to 1, since this benchmark fails.
* src/minver/Makefile.am: LDADD libbeebs.
* src/minver/Makefile.in: Regenerated.
* src/minver/libminver.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value, include math.h and string.h
(a_ref): Array created and initialized.
(b): Array initialized.
(minver_fabs): Make function static.
(mmul, minver): Clean up layout.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, record results for verifying.
* src/nbody/Makefile.am: LDADD libbeebs.
* src/nbody/Makefile.in: Regenerated.
* src/nbody/nbody.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/ndes/Makefile.am: LDADD libbeebs.
* src/ndes/Makefile.in: Regenerated.
* src/ndes/libndes.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, initialize values in loop.
(initialise_benchmark): Contents moved into main benchmark
function.
* src/nettle-aes/Makefile.am: LDADD libbeebs.
* src/nettle-aes/Makefile.in: Regenerated.
* src/nettle-aes/nettle-aes.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/nettle-arcfour/Makefile.am: LDADD libbeebs.
* src/nettle-arcfour/Makefile.in: Regenerated.
* src/nettle-arcfour/arcfour.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/nettle-cast128/Makefile.am: LDADD libbeebs.
* src/nettle-cast128/Makefile.in: Regenerated.
* src/nettle-cast128/cast128.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/nettle-des/Makefile.am: LDADD libbeebs.
* src/nettle-des/Makefile.in: Regenerated.
* src/nettle-des/des.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/nettle-md5/Makefile.am: LDADD libbeebs.
* src/nettle-md5/Makefile.in: Regenerated.
* src/nettle-md5/md5.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/nettle-sha256/Makefile.am: LDADD libbeebs.
* src/nettle-sha256/Makefile.in: Regenerated.
* src/nettle-sha256/nettle-sha256.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/newlib-exp/Makefile.am: LDADD libbeebs.
* src/newlib-exp/Makefile.in: Regenerated.
* src/newlib-exp/ef_exp.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/newlib-log/Makefile.am: LDADD libbeebs.
* src/newlib-log/Makefile.in: Regenerated.
* src/newlib-log/ef_log.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/newlib-mod/Makefile.am: LDADD libbeebs.
* src/newlib-mod/Makefile.in: Regenerated.
* src/newlib-mod/ef_mod.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/newlib-sqrt/Makefile.am: LDADD libbeebs.
* src/newlib-sqrt/Makefile.in: Regenerated.
* src/newlib-sqrt/ef_sqrt.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/ns/Makefile.am: LDADD libbeebs.
* src/ns/Makefile.in: Regenerated.
* src/ns/libns.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value, remove superfluous blank lines throughout.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Create version which actually verifies.
* src/nsichneu/Makefile.am: LDADD libbeebs.
* src/nsichneu/Makefile.in: Regenerated.
* src/nsichneu/libnsichneu.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/picojpeg/Makefile.am: LDADD libbeebs.
* src/picojpeg/Makefile.in: Regenerated.
* src/picojpeg/libpicojpeg.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value, remove trailing whitespace
throughout.
* src/picojpeg/picojpeg.h: Remove trailing whitespace throughout.
* src/picojpeg/picojpeg_test.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Create version which actually verifies.
* src/prime/Makefile.am: LDADD libbeebs.
* src/prime/Makefile.in: Regenerated.
* src/prime/libprime.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/qrduino/Makefile.am: LDADD libbeebs.
* src/qrduino/Makefile.in: Regenerated.
* src/qrduino/qrframe.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(init_heap, malloc_beebs, calloc_beebs, free_beebs): Deleted.
* src/qrduino/qrtest.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify using memcpy.
* src/qsort/Makefile.am: LDADD libbeebs.
* src/qsort/Makefile.in: Regenerated.
* src/qsort/libqsort.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(arr_ref): Created and initialized.
(void sort): Fixed to work for 0 based arrays.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/qurt/Makefile.am: LDADD libbeebs.
* src/qurt/Makefile.in: Regenerated.
* src/qurt/libqurt.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/recursion/Makefile.am: LDADD libbeebs.
* src/recursion/Makefile.in: Regenerated.
* src/recursion/librecursion.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/rijndael/Makefile.am: LDADD libbeebs.
* src/rijndael/Makefile.in: Regenerated.
* src/rijndael/aesxam.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(rand_beebs): Deleted.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/select/Makefile.am: LDADD libbeebs.
* src/select/Makefile.in: Regenerated.
* src/select/libselect.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value, include math.h and string.h.
(arr_ref): Array created and initialized.
(SWAP): Macro deleted.
(swap): Created.
(select): Rewritten to match text book, for zero based vectors and
using the swap function.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, initialize data in loop.
(initialise_benchmark): Move contents into main benchmark
function.
(verify_benchmark): Create version which actually verifies.
* src/sglib-arraybinsearch/Makefile.am: LDADD libbeebs.
* src/sglib-arraybinsearch/Makefile.in: Regenerated.
* src/sglib-arraybinsearch/arraybinsearch.c: Change SCALE_FACTOR
to LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/sglib-arrayheapsort/Makefile.am: LDADD libbeebs.
* src/sglib-arrayheapsort/Makefile.in: Regenerated.
* src/sglib-arrayheapsort/arrayheapsort.c: Convert from symbolic
link to arraysort and rename.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/sglib-arrayheapsort/arraysort.c: Symbolic link deleted.
* src/sglib-arrayheapsort/sglib.h: Convert from symbolic link.
* src/sglib-arrayquicksort/Makefile.am: LDADD libbeebs.
* src/sglib-arrayquicksort/Makefile.in: Regenerated.
* src/sglib-arrayquicksort/arrayquicksort.c: Convert from symbolic
link to arraysort and rename.
* src/sglib-arrayquicksort/arraysort.c: Symbolic link deleted.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/sglib-arrayquicksort/sglib.h: Convert from symbolic link.
* src/sglib-arraysort/.gitignore: Deleted.
* src/sglib-arraysort/Makefile.am: Deleted.
* src/sglib-arraysort/Makefile.in: Deleted.
* src/sglib-arraysort/sglib.h: Deleted.
* src/sglib-dllist/Makefile.am: LDADD libbeebs.
* src/sglib-dllist/Makefile.in: Regenerated.
* src/sglib-dllist/dllist.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(verify_benchmark): Create version which actually verifies.
(initialise_benchmark): Move contents into main benchmark
function.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, initialize heap each time rount the loop.
* src/sglib-hashtable/Makefile.am: LDADD libbeebs.
* src/sglib-hashtable/Makefile.in: Regenerated.
* src/sglib-hashtable/hashtable.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(verify_benchmark): Create version which actually verifies.
(initialise_benchmark): Move contents into main benchmark
function.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, initialize heap each time rount the loop.
* src/sglib-listinsertsort/Makefile.am: LDADD libbeebs.
* src/sglib-listinsertsort/Makefile.in: Regenerated.
* src/sglib-listinsertsort/listinsertsort.c: Change SCALE_FACTOR
to LOCAL_SCALE_FACTOR and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(verify_benchmark): Simplify and also check for heap overrun.
(benchmark): Simplify and repeat according to LOCAL_SCALE_FACTOR
and REPEAT_FACTOR.
* src/sglib-listsort/Makefile.am: LDADD libbeebs.
* src/sglib-listsort/Makefile.in: Regenerated.
* src/sglib-listsort/listsort.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(verify_benchmark): Simplify and also check for heap overrun.
(benchmark): Simplify and repeat according to LOCAL_SCALE_FACTOR
and REPEAT_FACTOR.
* src/sglib-queue/Makefile.am: LDADD libbeebs.
* src/sglib-queue/Makefile.in: Regenerated.
* src/sglib-queue/queue.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(verify_benchmark): Simplify.
(benchmark): Simplify and repeat according to LOCAL_SCALE_FACTOR
and REPEAT_FACTOR.
* src/sglib-rbtree/Makefile.am: LDADD libbeebs.
* src/sglib-rbtree/Makefile.in: Regenerated.
* src/sglib-rbtree/rbtree.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(init_heap, malloc_beebs, free_beebs): Deleted.
(verify_benchmark): Simplify and also check for heap overrun.
(benchmark): Simplify and repeat according to LOCAL_SCALE_FACTOR
and REPEAT_FACTOR.
* src/slre/Makefile.am: LDADD libbeebs.
* src/slre/Makefile.in: Regenerated.
* src/slre/libslre.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/sqrt/Makefile.am: LDADD libbeebs.
* src/sqrt/Makefile.in: Regenerated.
* src/sqrt/libsqrt.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, return 16-bit result.
(verify_benchmark): Simplify to work with 16-bit integers.
* src/st/Makefile.am: LDADD libbeebs.
* src/st/Makefile.in: Regenerated.
* src/st/libst.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify and make more reliable.
* src/statemate/Makefile.am: LDADD libbeebs.
* src/statemate/Makefile.in: Regenerated.
* src/statemate/libstatemate.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, initialize in loop.
(initialise_benchmark): Move contents into main benchmark
function.
(verify-benchmark): Tidy up.
* src/stb_perlin/Makefile.am: LDADD libbeebs.
* src/stb_perlin/Makefile.in: Regenerated.
* src/stb_perlin/libstb_perlin.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/stringsearch1/Makefile.am: LDADD libbeebs.
* src/stringsearch1/Makefile.in: Regenerated.
* src/stringsearch1/stringsearch1.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/strstr/Makefile.am: LDADD libbeebs.
* src/strstr/Makefile.in: Regenerated.
* src/strstr/libstrstr.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/tarai/Makefile.am: LDADD libbeebs.
* src/tarai/Makefile.in: Regenerated.
* src/tarai/libtarai.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR
and update value.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
(verify_benchmark): Simplify.
* src/template/.gitignore: Deleted.
* src/template/Makefile.am: Deleted.
* src/template/Makefile.in: Deleted.
* src/template/libtemplate.c: Deleted.
* src/trio-snprintf/Makefile.am: LDADD libbeebs.
* src/trio-snprintf/Makefile.in: Regenerated.
* src/trio-snprintf/trio.c: Convert from symbolic link.
* src/trio-snprintf/trio.h: Convert from symbolic link
* src/trio-snprintf/trio_test.c: Convert from symbolic link,
change SCALE_FACTOR to LOCAL_SCALE_FACTOR and update value.q
(verify_benchmark): Improved.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, capture all outputs.
* src/trio-snprintf/triodef.h: Convert from symbolic link
* src/trio-snprintf/triop.h: Convert from symbolic link
* src/trio-snprintf/triostr.c: Convert from symbolic link.
(struct _trio_string_t):
(internal_string_alloc):
* src/trio-snprintf/triostr.h: Convert from symbolic link
* src/trio-sscanf/Makefile.am: LDADD libbeebs.
* src/trio-sscanf/Makefile.in: Regenerated.
* src/trio-sscanf/trio.c: Convert from symbolic link.
* src/trio-sscanf/trio.h: Convert from symbolic link.
* src/trio-sscanf/trio_test.c: Convert from symbolic link, change
SCALE_FACTOR to LOCAL_SCALE_FACTOR and update value.q
(verify_benchmark): Improved.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, capture all inputs.
* src/trio-sscanf/triodef.h: Convert from symbolic link.
* src/trio-sscanf/triop.h: Convert from symbolic link.
* src/trio-sscanf/triostr.c: Convert from symbolic link.
* src/trio-sscanf/triostr.h: Convert from symbolic link.
* src/trio/.gitignore: Deleted.
* src/trio/Makefile.am: Deleted.
* src/trio/Makefile.in: Deleted.
* src/trio/trio.c: Deleted.
* src/trio/trio.h: Deleted.
* src/trio/trio_test.c: Deleted.
* src/trio/triodef.h: Deleted.
* src/trio/triop.h: Deleted.
* src/trio/triostr.c: Deleted.
* src/trio/triostr.h: Deleted.
* src/ud/Makefile.am: LDADD libbeebs.
* src/ud/Makefile.in: Regenerated.
* src/ud/libud.c: Change SCALE_FACTOR to LOCAL_SCALE_FACTOR and
update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/whetstone/Makefile.am: LDADD libbeebs.
* src/whetstone/Makefile.in: Regenerated.
* src/whetstone/libwhetstone.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR.
* src/wikisort/Makefile.am: LDADD libbeebs.
* src/wikisort/Makefile.in: Regenerated.
* src/wikisort/libwikisort.c: Change SCALE_FACTOR to
LOCAL_SCALE_FACTOR and update value.
(rand_beebs): Deleted.
(verify_benchmark): Create version which actually verifies.
(benchmark): Repeat according to LOCAL_SCALE_FACTOR and
REPEAT_FACTOR, correct use of addresses in function table.
* support/Makefile.am: Created libbeebs.la, with associated source
files.
* support/Makefile.in: Regenerated.
* support/beebsc.c: Created.
* support/beebsc.h: Created.
* support/main.c (main): Remove loop for calling benchmark, all
scaling now in individual benchmarks.
* support/support.h: Include beebsc.h
2019-04-24 Jeremy Bennett <jeremy.bennett@embecosm.com>
* Makefile.in: Regenerated.
* configure: Regenerated.
* configure.ac: Add USER_CFLAGS and USER_LDFLAGS to CFLAGS and
LDFLAGS respectively, AC_SUBST CFLAGS and LDFLAGS.
2019-04-24 Jeremy Bennett <jeremy.bennett@embecosm.com>
* src/nettle-md5/md5.c: Include string.h, define digest_ref, a copy of
the digest array for initialization.
(benchmark): Initialize the digest array every time we are called.
(verify_benchmark): Correct the expected array and use memcmp for
efficient testing.
2019-04-24 Jeremy Bennett <jeremy.bennett@embecosm.com>
The initial data for FDCT was in a global block, overwritten by
the transformation. Calling the benchmark multiple times used the
result of the previous call as input, so the result depended on
the number of calls, which varies between platforms.
* src/fdct/libfdct.c: Declare block_ref as reference input and
exp_res as expected resut.
(int benchmark): Initialize block from block_ref each time.
(int verify_benchmark): Single definitive test for validity.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
In two places the declaration of init_heap followed K&R, rather
than ANSI syntax. Now corrected.
* src/dtoa/libdtoa.c (init_heap): Correct prototype of the function.
* src/huffbench/libhuffbench.c (init_heap): Likewise.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify one more sglib benchmarks to use its own version of malloc
and free to reduce library and OS dependency.
* src/sglib-listsort/listsort.c (init_heap, malloc_beebs, free_beebs):
Created.
(initialise_benchmark): Add call to init_heap
(benchmark): Replace call to malloc by malloc_beebs and call to
free by free_beebs.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify both trio benchmarks to use there own version of malloc,
free and calloc to reduce library and OS dependency.
* src/trio/trio.c (init_heap, malloc_beebs, realloc_beebs)
(free_beebs): Created.
* src/trio/trio.h: Add declarations for init_heap, malloc_beebs,
realloc_beebs, and free_beebs.
* src/trio/trio_test.c (initialise_benchmark): add call to init_heap.
* src/trio/triop.h: Point macros to malloc_beebs, realloc_beebs,
and free_beebs.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify all the sglib benchmarks to use there own version of malloc
and free to reduce library and OS dependency.
* src/sglib-dllist/dllist.c (init_heap, malloc_beebs, free_beebs):
Created.
(initialise_benchmark): Add call to init_heap
(benchmark): Replace call to malloc by malloc_beebs and call to
free by free_beebs.
* src/sglib-hashtable/hashtable.c (init_heap, malloc_beebs)
(free_beebs): Created.
(initialise_benchmark): Add call to init_heap
(benchmark): Replace call to malloc by malloc_beebs and call to
free by free_beebs.
* src/sglib-listinsertsort/listinsertsort.c (init_heap)
(malloc_beebs, free_beebs): Created.
(initialise_benchmark): Add call to init_heap
(benchmark): Replace call to malloc by malloc_beebs and call to
free by free_beebs.
* src/sglib-rbtree/rbtree.c (init_heap, malloc_beebs, free_beebs):
Created.
(initialise_benchmark): Add call to init_heap
(benchmark): Replace call to malloc by malloc_beebs and call to
free by free_beebs.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify the qrduino benchmark to use its own version of malloc, free
and calloc to reduce library and OS dependency.
* src/qrduino/qrframe.c (init_heap, malloc_beebs, calloc_beebs)
(free_beebs): Created.
(initframe): Replace calloc and malloc by calloc_beebs and
malloc-beebs respectively.
(freeframe): Replace free by free_beebs.
(initecc): Replace malloc by malloc_beebs.
(freeecc): Replace free by free_beebs.
* src/qrduino/qrtest.c (initialise_benchmark): Add call to
init_heap.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify the miniz benchmark to use its own version of malloc, free
and realloc to reduce library and OS dependency.
* src/miniz/miniz.c: Define MINIZ_NO_MALLOC and MZ_MALLOC, MZ_FREE
and MZ_REALLOC invoking BEEBS variants.
(init_heap, malloc_beebs, realloc_beebs, free_beebs): Created.
* src/miniz/miniz_b.c (initialise_benchmark): Add call to init_heap.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify the huffbench benchmark to use its own version of malloc
and free to reduce library and OS dependency.
* src/huffbench/libhuffbench.c (init_heap, malloc_beebs)
(free_beebs): Created.
(generate_test_data): Replace call to malloc by call to
malloc_beebs.
(compdecomp): Replace call to malloc by call to malloc_beebs and
free by call to malloc_free.
(benchmark): Replace call to free by call to malloc_free.
(initialise_benchmark): Add call to init_heap.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify the fasta benchmark to use alloca rather than malloc to
reduce library and OS dependency.
* src/fasta/libfasta.c (repeat_fasta): Replace use of malloc by
alloca, and comment out associated call to free.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify the dtoa benchmark to use its own version of malloc and
free to reduce library and OS dependency. For this benchmark,
hooks are provided to facilitate this.
* src/dtoa/libdtoa.c (MALLOC, FREE): Define these to be
malloc_beebs and free_beebs respectively.
(init_heap, malloc_beebs, free_beebs): Created.
(initialise_benchmark): Add call to init_heap.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
Modify the dijkstra test to use its own version of malloc and
free to reduce library and OS dependency.
* src/dijkstra/dijkstra_small.c (qinit_heap, qmalloc_beebs)
(qfree_beebs): Created.
(void enqueue): Replace malloc by qmalloc_beebs.
(int dijkstra): Replace free by qfree_beebs.
(initialise_benchmark): Add call to qinit_heap.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
The use of malloc/free in embedded applications is
problematic. For a benchmark it also places heavy dependence on a
library impementation. This commit replaces library malloc/free by
simple in program allocation from a block of global memory.
* src/ctl-string/string.c (init_heap, malloc_beebs, free_beebs):
Created.
(ctl_StringInitSize, ctl_StringInitCopy): Replace malloc by
malloc_beebs.
(ctl_StringFree): Replace free by malloc_free.
(ctl_StringSet, ctl_StringSetString, ctl_StringAppend)
(ctl_StringInsertAt, ctl_StringSetSubStr): Replace malloc by
malloc_beebs.
(initialise_benchmark): Add call to init_heap.
* src/ctl/ctl.c (init_heap, malloc_beebs, free_beebs):
Created.
(initialise_benchmark): Add call to init_heap.
* src/ctl/stack.h: Replace calls to malloc by calls to
malloc_beebs and calls to free by calls to malloc_free throughout.
* src/ctl/vector.h: Likewise.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
The mask used in rand_beebs needs to be long unsigned, to ensure
correct behavior where int is 16-bits long.
* src/crc32/crc_32.c (rand_beebs): Make mask constant long unsigned.
* src/mergesort/libmergesort.c (rand_beebs): Likewise.
* src/rijndael/aesxam.c (rand_beebs): Likewise.
* src/wikisort/libwikisort.c (rand_beebs): Likewise.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
BEEBS uses its own random number generator which works on all
architectures, even where int is 16 bits long. To go with this, it
provides its own definition of the constant RAND_MAX as 2^15-1,
its smallest permitted value.
* src/mergesort/libmergesort.c: Provide custom definition of RAND_MAX.
* src/wikisort/libwikisort.c: Likewise.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
This replaces all calls to rand () by rand_beebs, a standard
source implementation, independent of RAND_MAX and choice of
multiplier and offset. It also eliminates an unused macro.
* src/wikisort/libwikisort.c: Comment out Allocate macro, which is
never used.
(rand_beebs): Created.
(TestingRandom, TestingMostlyDescending, TestingMostlyAscending)
(TestingJittered, TestingMostlyEqual): Replace rand by rand_beebs.
(benchmark): Comment out use of srand.
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
This replaces all calls to rand () by rand_beebs, a standard
source implementation, independent of RAND_MAX and choice of
multiplier and offset.
* src/rijndael/aesxam.c (rand_beebs): Created.
(fillrand, encfile, decfile): Use rand_beebs () instead of rand ().
2019-04-18 Jeremy Bennett <jeremy.bennett@embecosm.com>
This replaces all calls to rand () by rand_beebs, a standard
source implementation, independent of RAND_MAX and choice of
multiplier and offset. It also uses alloca instead of malloc/free
to reduce library dependency.
* src/mergesort/libmergesort.c: Comment out Var andd Allocate macros.
(rand_beebs): Created.
(MergeSort): Replace macros by alloca and comment out call to free.
(TestingRandom, TestingMostlyDescending, TestingMostlyAscending)
(TestingJittered, TestingMostlyEqual): Replace rand by rand_beebs.
(benchmark): Comment out use of srand.
2019-04-04 Jeremy Bennett <jeremy.bennett@embecosm.com>
This replaces all calls to rand () by rand_beebs, a standard
source implementation, independent of RAND_MAX and choice of
multiplier and offset.
* src/crc32/crc_32.c (rand_beebs): Created.
(crc32pseudo): Use rand_beebs () instead of rand ().
(verify_benchmark): Set value to be consistent with use of
rand_beebs.
2019-03-18 Graham Markall <graham.markall@embecosm.com>
* configure: Regenerate.
* configure.ac: Configure nettle-aes.
* src/Makefile.am: Add nettle-aes.
* src/Makefile.in: Regenerate.
* src/nettle-aes/.gitignore: New file.
* src/nettle-aes/Makefile.am: New file.
* src/nettle-aes/Makefile.in: New file.
* src/nettle-aes/nettle-aes.c: New file.
2019-03-25 Graham Markall <graham.markall@embecosm.com>
* configure: Regenerate.
* configure.ac: Add board flags to flags before config checks.
* config/arm/chips/nrf51822/chip.ld: Add vector_table entry point.
* src/aha-compress/Makefile.am: Drop libmain. Link libsupportfirst.
* src/aha-compress/Makefile.in: Regenerate.
* src/aha-mont64/Makefile.am: Drop libmain. Link libsupport first.
* src/aha-mont64/Makefile.in: Regenerate.
* src/bs/Makefile.am: Drop libmain. Link libsupport first.
* src/bs/Makefile.in: Regenerate.
* src/bubblesort/Makefile.am: Drop libmain. Link libsupport first.
* src/bubblesort/Makefile.in: Regenerate.
* src/cnt/Makefile.am: Drop libmain. Link libsupport first.
* src/cnt/Makefile.in: Regenerate.
* src/common.mk.am: