-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathMakefile
More file actions
1003 lines (902 loc) · 27.3 KB
/
Makefile
File metadata and controls
1003 lines (902 loc) · 27.3 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
.PHONY: check-deps
OS := $(shell uname)
PREFIX=$$HOME
D=dune
#Limit parallelism of some expensive operations
ifeq ($(OS),Darwin)
J=$(shell sysctl -n hw.logicalcpu)
else
J=$(shell nproc)
endif
REGRESSION_TEST_MODE = test
# REGRESSION_TEST_MODE = promote
# REGRESSION_TEST_MODE = show
DUNE_PROFILE = release
DIY = _build/install/default/bin/diy7
DIYCROSS = _build/install/default/bin/diycross7
DIYMICROENUM = _build/install/default/bin/diymicroenum7
HERD = _build/install/default/bin/herd7
LITMUS = _build/install/default/bin/litmus7
LITMUS_LIB_DIR = $(PWD)/litmus/libdir
DIY_REGRESSION_TEST = _build/default/internal/diy_regression_test.exe
HERD_REGRESSION_TEST = _build/default/internal/herd_regression_test.exe
HERD_DIYCROSS_REGRESSION_TEST = _build/default/internal/herd_diycross_regression_test.exe
HERD_CATALOGUE_REGRESSION_TEST = _build/default/internal/herd_catalogue_regression_test.exe
HERD_ASSUMPTIONS_TEST = _build/default/internal/herd_assumptions_test.exe
ASLREF = _build/default/asllib/aslref.exe
CHECK_OBS = _build/default/internal/check_obs.exe
all: build
CATA_HERD_TEST_MODE := $(if $(ALL_TESTS), ,-fast)
HERD_CATALOGUE_REGRESSION_TEST += $(CATA_HERD_TEST_MODE)
.PHONY: Version.ml
Version.ml:
sh ./version-gen.sh $(PREFIX)
just-build: Version.ml
dune build -j $(J) --profile $(DUNE_PROFILE)
build-release: Version.ml
dune build -j $(J) -p herdtools7 @install
build: check-deps | just-build
install:
sh ./dune-install.sh $(PREFIX)
uninstall:
sh ./dune-uninstall.sh $(PREFIX)
clean: dune-clean clean-asl-pseudocode clean-asldoc
rm -f Version.ml
dune-clean:
dune clean
versions: Version.ml
@ dune build -j $(J) --workspace dune-workspace.versions
# Dependencies.
check-deps::
$(if $(shell which ocaml),,$(error "Could not find ocaml in PATH"))
$(if $(shell which menhir),,$(error "Could not find menhir in PATH; it can be installed with `opam install menhir`."))
check-deps::
$(if $(shell which dune),,$(error "Could not find dune in PATH; it can be installed with `opam install dune`."))
# Tests.
TIMEOUT=16.0
test-all:: test
test:: | build
test:: dune-test
@ echo "OCaml unit tests: OK"
dune-test:
@ echo
dune runtest --profile=$(DUNE_PROFILE)
test-all:: test.aarch64assumptions
test-local:: test.aarch64assumptions
test.aarch64assumptions:
@ echo
$(HERD_ASSUMPTIONS_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-dirs-and-confs-path ./dirs-and-confs.txt \
-assumptions-path ./tools/libdir/aarch64assumptions.cat
@ echo "cat2table AArch64 assumptions: OK"
test:: test.aarch64
test-local:: test.aarch64
test.aarch64:
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64 \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 instructions tests: OK"
test:: test.aarch64.asl
test-all-asl:: test.aarch64.asl
test.aarch64.asl: asl-pseudocode
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64 \
-conf ./herd/tests/instructions/AArch64/asl.cfg \
-checkstates \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 instructions tests (ASL): OK"
test-all-asl:: test.aarch64.asl.with.vmsa
test.aarch64.asl.with.vmsa: asl-pseudocode
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64 \
-conf ./herd/tests/instructions/AArch64/asl-with-vmsa.cfg \
-checkstates \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 instructions tests (ASL with VMSA): OK"
test:: test.riscv
test-local:: test.riscv
test.riscv:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/RISCV \
$(REGRESSION_TEST_MODE)
@ echo "herd7 RISCV instructions tests: OK"
test:: test.x86_64
test-local:: test.x86_64
test.x86_64:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/X86_64 \
$(REGRESSION_TEST_MODE)
@ echo "herd7 X86_64 instructions tests: OK"
test:: test.mixed
test-local:: test.mixed
test.mixed:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.mixed \
-conf ./herd/tests/instructions/AArch64.mixed/mixed.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 mixed instructions tests: OK"
test:: test.mips
test-local:: test.mips
test.mips:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/MIPS \
$(REGRESSION_TEST_MODE)
@ echo "herd7 MIPS instructions tests: OK"
test:: test.neon
test-local:: test.neon
test.neon::
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.neon \
-variant neon \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 NEON instructions tests: OK"
test:: test.sve
test-local:: test.sve
test.sve::
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.sve \
-variant sve \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 SVE instructions tests: OK"
test:: test.asl.sve
test-local:: test.asl.sve
test-all-asl:: test.asl.sve
test.asl.sve: asl-pseudocode
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.sve \
-variant sve \
-conf ./herd/tests/instructions/AArch64.sve/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 ASL SVE instructions tests: OK"
test:: test.sme
test-local:: test.sme
test.sme::
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.sme \
-variant sme \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 SME instructions tests: OK"
test:: test.mte
test-local:: test.mte
test.mte::
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.MTE \
-conf ./herd/tests/instructions/AArch64.MTE/mte.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 MTE instructions tests: OK"
test:: test.self
test-local:: test.self
test.self:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.self \
-conf ./herd/tests/instructions/AArch64.self/self.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 variant -self instructions tests: OK"
test:: test.kvm
test-local:: test.kvm
test.kvm:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.kvm \
-conf ./herd/tests/instructions/AArch64.kvm/kvm.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 KVM instructions tests: OK"
test:: test-asl-vmsa
test-asl-vmsa:: test.kvm.asl
test-all-asl:: test.kvm.asl
test.kvm.asl: asl-pseudocode
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.kvm \
-conf ./herd/tests/instructions/AArch64.kvm/asl-vmsa.cfg \
-checkstates \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 KVM (ASL) instructions tests: OK"
test:: test-c
test-local:: test-c
test-c:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/C \
-conf ./herd/tests/instructions/C/c.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 C instructions tests: OK"
test:: test-ppc
test-local:: test-ppc
test-ppc:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/PPC \
$(REGRESSION_TEST_MODE)
@ echo "herd7 PPC instructions tests: OK"
test:: test-asl
test-local:: test-asl
test-all-asl:: test-asl
test-asl: asl-pseudocode
@ echo
$(HERD_REGRESSION_TEST) \
-nohash \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/ASL \
$(REGRESSION_TEST_MODE)
@ echo "herd7 ASL instructions tests: OK"
test:: test-pseudo-asl
test-local:: test-pseudo-asl
test-all-asl:: test-pseudo-asl
test-pseudo-asl:
@ echo
$(HERD_REGRESSION_TEST) \
-nohash \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/ASL-pseudo-arch \
-conf ./herd/tests/instructions/ASL-pseudo-arch/pseudo-conf.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 ASL instructions tests on pseudo-architecture: OK"
test:: test-aarch64-asl
test-all-asl:: test-aarch64-asl
test-aarch64-asl: asl-pseudocode
@echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.ASL \
-conf ./herd/tests/instructions/AArch64.ASL/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64+ASL instructions tests: OK"
test-all-asl:: test-aarch64-asl-with-vmsa
test-aarch64-asl-with-vmsa: asl-pseudocode
@echo
$(HERD_REGRESSION_TEST) \
-j $(J) -checkstates \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.ASL \
-conf ./herd/tests/instructions/AArch64.ASL/asl-with-vmsa.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64+ASL (with VMSA) instructions tests: OK"
test:: test-aarch64-noasl
test-local:: test-aarch64-noasl
test-aarch64-noasl:
@echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.ASL \
-conf ./herd/tests/instructions/AArch64.ASL/noasl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64+NOASL instructions tests: OK"
test:: test-aarch64-noasl-mixed
test-local:: test-aarch64-noasl-mixed
test-aarch64-noasl-mixed:
@echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.ASL \
-conf ./herd/tests/instructions/AArch64.ASL/noasl-mixed.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64+NOASL+MIXED instructions tests: OK"
test:: arm-test
test-local:: arm-test
arm-test::
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/ARM \
$(REGRESSION_TEST_MODE)
@ echo "herd7 ARM instructions tests: OK"
test::aarch32-test
test-local::aarch32-test
aarch32-test::
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch32 \
-conf ./herd/tests/instructions/AArch32/aarch32.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch32 instructions tests: OK"
test-bnfc:
@ echo
dune runtest asllib/menhir2bnfc
@ echo "BNFC tests: OK"
test:: test.pac
test-local:: test.pac
test.pac::
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.PAC \
-conf ./herd/tests/instructions/AArch64.PAC/pac.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 PAC instructions tests: OK"
### CATALOGUE testing, catalogue must be here
CATATEST := $(shell if test -d catalogue; then echo cata-test; fi)
test:: $(CATATEST)
test-local:: $(CATATEST)
test-all:: cata-test cata-test-asl
test-all-asl:: cata-test-asl
cata-test:: cata-bpf-test
cata-bpf-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-timeout $(TIMEOUT) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/bpf/tests/kinds.txt \
-shelf-path catalogue/bpf/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue bpf tests: OK"
cata-test:: cata-aarch64-test
cata-aarch64-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-timeout $(TIMEOUT) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64/tests/kinds.txt \
-shelf-path catalogue/aarch64/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64 tests: OK"
cata-test-asl:: cata-aarch64-test-asl
cata-aarch64-test-asl: asl-pseudocode
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-variant asl \
-variant strict \
-herd-timeout $(TIMEOUT) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64/tests/kinds.txt \
-shelf-path catalogue/aarch64/shelf.py \
-conf-path catalogue/aarch64/cfgs/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64 tests (ASL): OK"
cata-test-asl:: cata-aarch64-cas-test-asl
cata-aarch64-cas-test-asl: asl-pseudocode
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-variant asl \
-variant strict \
-herd-timeout $(TIMEOUT) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-cas/tests/kinds.txt \
-shelf-path catalogue/aarch64-cas/shelf.py \
-conf-path catalogue/aarch64-cas/cfgs/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-cas tests (ASL): OK"
cata-test:: aarch64-test-mixed
aarch64-test-mixed:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-timeout $(TIMEOUT) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64/tests/kinds.txt \
-shelf-path catalogue/aarch64/shelf.py \
-variant mixed \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64 tests (mixed mode): OK"
cata-test:: mixed-test
mixed-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-mixed/tests/kinds.txt \
-shelf-path catalogue/aarch64-mixed/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-mixed tests: OK"
cata-test:: pick-test
pick-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-pick/tests/desired-kinds.txt \
-shelf-path catalogue/aarch64-pick/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-pick tests: OK"
cata-test-asl:: pick-test-asl
pick-test-asl: asl-pseudocode
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-variant asl \
-variant strict \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-pick/tests/desired-kinds.txt \
-shelf-path catalogue/aarch64-pick/shelf.py \
-conf-path catalogue/aarch64-pick/cfgs/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-pick tests (ASL): OK"
cata-test:: faults-test
faults-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-faults/tests/kinds.txt \
-shelf-path catalogue/aarch64-faults/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-faults tests: OK"
cata-test-asl:: asl-faults-test
asl-faults-test: asl-pseudocode
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-faults/tests/kinds.txt \
-shelf-path catalogue/aarch64-faults/shelf.py \
-conf-path catalogue/aarch64-faults/cfgs/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-faults tests (ASL): OK"
cata-test:: pick-test-mixed
pick-test-mixed:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-pick/tests/desired-kinds.txt \
-shelf-path catalogue/aarch64-pick/shelf.py \
-variant mixed \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-pick tests (mixed mode): OK"
cata-test:: mte-test
mte-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-herd-timeout $(TIMEOUT) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-MTE/tests/kinds.txt \
-shelf-path catalogue/aarch64-MTE/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-MTE tests: OK"
cata-test:: ifetch-test
ifetch-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-herd-timeout $(TIMEOUT) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-ifetch/kinds.txt \
-shelf-path catalogue/aarch64-ifetch/shelf-test.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-ifetch tests: OK"
# Not in cata-test, too-long
test-all:: vmsa-test
vmsa-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-VMSA/tests/VMSA-kinds.txt \
-shelf-path catalogue/aarch64-VMSA/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-VMSA tests: OK"
#Too long to include in `make test-all`. Add -verbose option to reassure us that something is running
test-all-asl:: cata-asl-vmsa-test
cata-asl-vmsa-test: asl-pseudocode
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-verbose \
-j $(J) \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-VMSA/tests/VMSA-kinds.txt \
-shelf-path catalogue/aarch64-VMSA/shelf.py \
-conf-path catalogue/aarch64-VMSA/cfgs/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-VMSA tests: OK"
test-all:: cata-aarch64-cas-test
cata-aarch64-cas-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-cas/tests/kinds.txt \
-shelf-path catalogue/aarch64-cas/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-cas tests: OK"
test-all:: ets2-test
ets2-test:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/aarch64-ETS2/tests/VMSA-ETS2-kinds.txt \
-shelf-path catalogue/aarch64-ETS2/shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue aarch64-ETS2 tests: OK"
test-all:: test.vmsa+mte
test.vmsa+mte:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.vmsa+mte \
-conf ./herd/tests/instructions/AArch64.vmsa+mte/vmsa+mte.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 VMSA+MTE instructions tests: OK"
test:: test.vmsa+ifetch
test-local:: test.vmsa+ifetch
test.vmsa+ifetch:
@ echo
$(HERD_REGRESSION_TEST) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/AArch64.vmsa+ifetch \
-conf ./herd/tests/instructions/AArch64.vmsa+ifetch/vmsa+ifetch.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 VMSA+ifetch instructions tests: OK"
### Diy tests, includes
### - A `diy7` with `cycleonly` instance checks the cycle generations
### - Several `diycross7` + `herd7` instances, check if the generated litmus tests
### are equivalent based on `herd7` result.
diy-test:: | build
diy-test:: diy-baseline-cycleonly
diy-baseline-cycleonly::
@ echo
$(DIY_REGRESSION_TEST) \
-diy-path $(DIY) \
-conf ./gen/libdir/forbidden.conf \
-expected ./gen/tests/baseline-size-4.cycle.expected \
-diy-arg "-size" \
-diy-arg "4" \
$(REGRESSION_TEST_MODE)
@ echo "diy7 baseline configuration test: OK"
diy-test:: diy-ifetch-cycleonly
diy-ifetch-cycleonly::
@ echo
$(DIY_REGRESSION_TEST) \
-diy-path $(DIY) \
-conf ./gen/libdir/forbidden_ifetch.conf \
-expected ./gen/tests/ifetch.cycle.expected \
$(REGRESSION_TEST_MODE)
@ echo "diy7 ifetch configuration test: OK"
LDS:="Amo.Cas,Amo.LdAdd,Amo.LdClr,Amo.LdEor,Amo.LdSet"
LDSPLUS:="LxSx",$(LDS)
diy-test:: diy-test-aarch64
diy-test-aarch64:
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/AArch64 \
-diycross-arg -arch \
-diycross-arg AArch64 \
-diycross-arg 'A,L,P' \
-diycross-arg 'Pod**,Fenced**,DSB.SYd**,ISBd**,[Amo.Cas,Pod**],[Amo.Swp,Pod**],[Amo.StAdd,Pod**],[LxSx,Pod**]' \
-diycross-arg 'Rfe,Fre,Coe' \
-diycross-arg 'DpAddrdR,DpAddrdW,DpDatadW,CtrldR,CtrldW,DpAddrCseldR,DpAddrCseldW,DpDataCseldW,DpCtrlCseldR,DpCtrlCseldW,[DpCtrldR,ISB],[DpCtrldW,ISB]' \
-diycross-arg 'Rfe,Fre,Coe,Hat' \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 diycross7 tests: OK"
diy-test:: diy-test-mixed
diy-test-mixed::
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/AArch64.mixed \
-conf ./gen/tests/AArch64.mixed/mixed.cfg \
-diycross-arg -ua \
-diycross-arg 0 \
-diycross-arg -obs \
-diycross-arg oo \
-diycross-arg -arch \
-diycross-arg AArch64 \
-diycross-arg -variant \
-diycross-arg mixed \
-diycross-arg -hexa \
-diycross-arg Hat \
-diycross-arg h0 \
-diycross-arg $(LDSPLUS) \
-diycross-arg h0 \
-diycross-arg Rfi \
-diycross-arg w0 \
-diycross-arg Amo.StAdd \
-diycross-arg w0 \
-diycross-arg Rfi \
-diycross-arg h2 \
-diycross-arg $(LDS) \
-diycross-arg h2 \
-diycross-arg PodWR \
-diycross-arg Hat \
-diycross-arg w0 \
-diycross-arg Amo.LdSet \
-diycross-arg w0 \
-diycross-arg PodWR \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64.mixed diycross7 tests: OK"
diy-test-mixed::
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/AArch64.mixed.strict \
-conf ./gen/tests/AArch64.mixed.strict/mixed.cfg \
-diycross-arg -arch \
-diycross-arg AArch64 \
-diycross-arg -ua \
-diycross-arg 0 \
-diycross-arg -variant \
-diycross-arg mixed,MixedStrictOverlap \
-diycross-arg -hexa \
-diycross-arg h0,h2,w0 \
-diycross-arg Amo.CasAP,LxSxAP \
-diycross-arg h0,h2,w0 \
-diycross-arg PodWR \
-diycross-arg w0,h0 \
-diycross-arg Fre \
-diycross-arg w0,h2 \
-diycross-arg FencedWW \
-diycross-arg w0,h0,h2 \
-diycross-arg Rfe \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64.mixed.strict diycross7 tests: OK"
diy-test-mixed:: v32 v64
v32:
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/AArch64.mixed.v32 \
-conf ./gen/tests/AArch64.mixed.strict/mixed.cfg \
-diycross-arg -arch \
-diycross-arg AArch64 \
-diycross-arg -variant \
-diycross-arg mixed \
-diycross-arg -hexa \
-diycross-arg PodWW \
-diycross-arg RfeLA \
-diycross-arg h0,h2,w0 \
-diycross-arg DpDatadW,DpAddrdR,DpAddrdW \
-diycross-arg A,P,L \
-diycross-arg h0,h2,w0 \
-diycross-arg Coe,Fre \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64.mixed.v32 diycross7 tests: OK"
v64:
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/AArch64.mixed.v64 \
-conf ./gen/tests/AArch64.mixed.strict/mixed.cfg \
-diycross-arg -arch \
-diycross-arg AArch64 \
-diycross-arg -variant \
-diycross-arg mixed \
-diycross-arg -hexa \
-diycross-arg -type \
-diycross-arg uint64_t \
-diycross-arg PodWW \
-diycross-arg RfeLA \
-diycross-arg w0,w4,q0 \
-diycross-arg DpDatadW,DpAddrdR,DpAddrdW \
-diycross-arg A,P,L \
-diycross-arg w0,w4,q0 \
-diycross-arg Coe,Fre \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64.mixed.v64 diycross7 tests: OK"
diy-test:: diy-store-test
diy-store-test:
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/AArch64.store \
-diycross-arg -obs \
-diycross-arg four \
-diycross-arg -arch \
-diycross-arg AArch64 \
-diycross-arg 'Fenced**' \
-diycross-arg 'Rfe,Fre,Coe' \
-diycross-arg 'DpAddrdR,DpDatadW' \
-diycross-arg 'Pos**' \
-diycross-arg 'Store' \
-diycross-arg 'Rfe,Fre,Coe' \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 diycross7.store tests: OK"
diy-test:: diy-test-mte
diy-test-mte::
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/AArch64.MTE \
-conf ./gen/tests/AArch64.MTE/MTE.cfg \
-diycross-arg -arch \
-diycross-arg AArch64 \
-diycross-arg -variant \
-diycross-arg memtag \
-diycross-arg DMB.SYd*W \
-diycross-arg T,P \
-diycross-arg Rfe \
-diycross-arg A \
-diycross-arg Amo.LdAdd \
-diycross-arg L \
-diycross-arg PodW* \
-diycross-arg T,P \
-diycross-arg Coe,Rfe,Fre \
-diycross-arg T,P \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64.MTE diycross7 tests: OK"
diy-test:: diy-test-C
diy-test-C:
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-diycross-path $(DIYCROSS) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/C \
-conf ./gen/tests/C/C.cfg \
-diycross-arg -arch \
-diycross-arg C \
-diycross-arg [Rlx,Coe,Rlx],[Rlx,Rfe,Rlx],[Rlx,Fre,Rlx],[Rlx,Hat,Rlx] \
-diycross-arg PosRW,Fetch.Add,Exch \
-diycross-arg Rlx \
-diycross-arg PodW* \
-diycross-arg [Rlx,Coe,Rlx],[Rlx,Rfe,Rlx],[Rlx,Fre,Rlx] \
-diycross-arg Pod**,[Fetch.Add,Rlx,PodW*] \
$(REGRESSION_TEST_MODE)
@ echo "herd7 C diycross7 tests: OK"
### Diymicro test
diymicro-test:: | build
diymicro-test:: diymicro-test-aarch64
diymicro-test-aarch64:
$(eval DIYMICRO_EDGES = $(shell $(DIYMICROENUM) -list-iico | sed -n 's/^iico\[\([^ ]*\).*/iico[\1]/p'))
$(eval DIYMICRO_EDGES_ARG := $(foreach arg,$(DIYMICRO_EDGES),-diycross-arg $(arg)))
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-herd-path $(HERD) \
-diycross-path $(DIYMICROENUM) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/diymicro/AArch64 \
$(DIYMICRO_EDGES_ARG) \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 diymicro7 tests: OK"
diymicro-test:: diymicro-test-aarch64-asl
diymicro-test-aarch64-asl: asl-pseudocode
$(eval DIYMICRO_EDGES = $(shell $(DIYMICROENUM) -list-iico | sed -n 's/^iico\[\([^ ]*\).*/iico[\1]/p'))
$(eval DIYMICRO_EDGES_ARG := $(foreach arg,$(DIYMICRO_EDGES),-diycross-arg $(arg)))
@ echo
$(HERD_DIYCROSS_REGRESSION_TEST) \
-herd-path $(HERD) \
-diycross-path $(DIYMICROENUM) \
-libdir-path ./herd/libdir \
-expected-dir ./gen/tests/diymicro/AArch64 \
-conf ./gen/tests/diymicro/AArch64/asl.cfg \
-j $(J) \
$(DIYMICRO_EDGES_ARG) \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 diymicro7 (ASL) tests: OK"
.PHONY: asl-pseudocode
asl-pseudocode:
@ $(MAKE) -C herd/libdir/asl-pseudocode build
.PHONY: clean-asl-pseudocode
clean-asl-pseudocode:
@ $(MAKE) -C herd/libdir/asl-pseudocode clean
.PHONY: asldoc
asldoc: Version.ml
@ dune build -j $(J) --profile $(DUNE_PROFILE) $(ASLREF)
@ $(MAKE) $(MFLAGS) -C asllib/doc all ASLREF=$(CURDIR)/$(ASLREF)
.PHONY: clean-asldoc
clean-asldoc:
@ $(MAKE) $(MFLAGS) -C asllib/doc clean
.PHONY: type-check-asl
type-check-asl: Version.ml
@ echo
@ dune build -j $(J) --profile $(DUNE_PROFILE) $(ASLREF)
@ $(MAKE) $(MFLAGS) -C herd/libdir/asl-pseudocode type-check ASLREF=$(CURDIR)/$(ASLREF)
@ echo "ASLRef type-checking of published Arm ASL code: OK"
.PHONY: dune-no-missing-file-in-runt
test:: dune-no-missing-file-in-runt
dune-no-missing-file-in-runt:
@ echo
asllib/tests/check-no-missing-file-in-run.sh ./
@ echo "no missing file in run.t"
RUN_TESTS?=false
$(V).SILENT:
$(V)SILENTOPT=-s