-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathMakefile
More file actions
642 lines (562 loc) · 18.1 KB
/
Copy pathMakefile
File metadata and controls
642 lines (562 loc) · 18.1 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
.DEFAULT_GOAL = all
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-herdtools:
dune install herdtools7 --prefix=$(PREFIX)
build-aslref:
dune build -p aslref --profile $(DUNE_PROFILE)
install-aslref:
dune install aslref --prefix=$(PREFIX)
install: install-herdtools
uninstall:
dune uninstall herdtools7 --prefix=$(PREFIX)
uninstall-aslref:
dune uninstall aslref --prefix=$(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.
.PHONY: check-deps
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.herd.inst.ASL-pseudo-arch: NOHASH=-nohash
test.herd.inst.ASL: NOHASH=-nohash
test.herd.inst.%:
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
$(NOHASH) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/$* \
-conf ./herd/tests/instructions/$*/ci.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 $* instructions tests: OK"
.PHONY: test.herd.inst
test.herd.inst:: test.herd.inst.AArch64
test.herd.inst:: test.herd.inst.AArch64.mixed
test.herd.inst:: test.herd.inst.AArch64.PAC
test.herd.inst:: test.herd.inst.AArch64.kvm
test.herd.inst:: test.herd.inst.AArch64.self
test.herd.inst:: test.herd.inst.AArch64.MTE
test.herd.inst:: test.herd.inst.AArch64.vmsa+mte
test.herd.inst:: test.herd.inst.AArch64.vmsa+ifetch
test.herd.inst:: test.herd.inst.AArch64.neon
test.herd.inst:: test.herd.inst.AArch64.sve
test.herd.inst:: test.herd.inst.AArch64.sme
test.herd.inst:: test.herd.inst.AArch64.gcs
test.herd.inst:: test.herd.inst.AArch32
test.herd.inst:: test.herd.inst.ARM
test.herd.inst:: test.herd.inst.PPC
test.herd.inst:: test.herd.inst.MIPS
test.herd.inst:: test.herd.inst.X86_64
test.herd.inst:: test.herd.inst.RISCV
test.herd.inst:: test.herd.inst.C
test.herd.inst:: test.herd.inst.ASL
test.herd.inst:: test.herd.inst.ASL-pseudo-arch
test:: test.herd.inst
test-local:: test.herd.inst
test.herd-asl.inst.%: asl-pseudocode
@ echo
$(HERD_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-libdir-path ./herd/libdir \
-litmus-dir ./herd/tests/instructions/$* \
-conf ./herd/tests/instructions/$*/asl.cfg \
-checkstates \
$(REGRESSION_TEST_MODE)
@ echo "herd7 $* instructions tests (ASL): OK"
test:: test.herd-asl.inst.AArch64
test:: test.herd-asl.inst.AArch64.sve
test:: test.herd-asl.inst.AArch64.kvm
test-local:: test.herd-asl.inst.AArch64.sve
test-all-asl:: test.herd.inst.ASL
test-all-asl:: test.herd.inst.ASL-pseudo-arch
test-all-asl:: test.herd-asl.inst.AArch64
test-all-asl:: test.herd-asl.inst.AArch64.sve
test-all-asl:: test.herd-asl.inst.AArch64.kvm
test-all-vmsa:: test.herd-asl.inst.AArch64.kvm
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-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-bnfc:
@ echo
dune runtest asllib/menhir2bnfc
@ echo "BNFC tests: OK"
### CATALOGUE testing, catalogue must be here
CATATEST := $(shell if test -d catalogue; then echo cata-test; fi)
CATATESTALL := $(shell if test -d catalogue; then echo cata-test-all; fi)
test:: $(CATATEST)
test-local:: $(CATATEST)
test-all:: cata-test cata-test-asl $(CATATESTALL)
test-all-asl:: cata-test-asl
test.herd.cata.%:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/$*/tests/kinds.txt \
-shelf-path catalogue/$*/ci-shelf.py \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue $* tests: OK"
cata-test:: test.herd.cata.aarch64
cata-test:: test.herd.cata.aarch64-mixed
cata-test:: test.herd.cata.aarch64-pick
cata-test:: test.herd.cata.aarch64-faults
cata-test:: test.herd.cata.aarch64-MTE
cata-test:: test.herd.cata.aarch64-PAC
cata-test:: test.herd.cata.aarch64-ifetch
cata-test:: test.herd.cata.aarch64-cas
cata-test-all:: test.herd.cata.aarch64-VMSA
cata-test:: test.herd.cata.aarch64-ETS2
cata-test:: test.herd.cata.aarch64-ETS3
cata-test:: test.herd.cata.aarch64-readers-guide
cata-test:: test.herd.cata.bpf
cata-test:: test.herd.cata.x86_64
test.herd-mixed.cata.%:
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
-j $(J) \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/$*/tests/kinds.txt \
-shelf-path catalogue/$*/ci-shelf.py \
-variant mixed \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue $* (mixed mode) tests: OK"
cata-test:: test.herd-mixed.cata.aarch64
cata-test:: test.herd-mixed.cata.aarch64-pick
test.herd-asl.cata.%: asl-pseudocode
@ echo
$(HERD_CATALOGUE_REGRESSION_TEST) \
$(EXTRA_OPTS) \
-j $(J) \
-variant asl \
-variant strict \
-herd-path $(HERD) \
-herd-timeout $(TIMEOUT) \
-libdir-path ./herd/libdir \
-kinds-path catalogue/$*/tests/kinds.txt \
-shelf-path catalogue/$*/ci-shelf.py \
-conf-path catalogue/$*/cfgs/asl.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 catalogue $* tests (ASL): OK"
cata-test-asl:: test.herd-asl.cata.aarch64
cata-test-asl:: test.herd-asl.cata.aarch64-cas
cata-test-asl:: test.herd-asl.cata.aarch64-pick
cata-test-asl:: test.herd-asl.cata.aarch64-faults
#Too long to include in `make test-all`. Add -verbose option to reassure us that something is running
test.herd-asl.cata.aarch64-VMSA:: EXTRA_OPTS=-verbose
test-all-asl:: test.herd-asl.cata.aarch64-VMSA
### Diy tests, includes
### - A `diyone7` generated syntax check
### - 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:: diyone-basic-test
diyone-basic-test:
@ echo
dune test gen/tests
@ echo "diy* basic test: OK"
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 -variant \
-diycross-arg async \
-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: build-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: build-aslref
@ echo
@ $(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
include Makefile.x86_64
include Makefile.aarch64