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
|
diff --git a/aarch64/full/spec.sail b/aarch64/full/spec.sail
index 897fa56e..2fcbf0d7 100644
--- a/aarch64/full/spec.sail
+++ b/aarch64/full/spec.sail
@@ -818,7 +818,7 @@ val InterruptPending : unit -> bool effect {rreg}
function InterruptPending () = return(__PendingInterrupt)
-val asl_Int : forall ('N : Int), 'N >= 0. (bits('N), bool) -> int
+val asl_Int : forall ('N : Int), 'N > 0. (bits('N), bool) -> int
function asl_Int (x, unsigned) = {
result : int = if unsigned then UInt(x) else SInt(x);
@@ -1825,7 +1825,7 @@ function aget_V 'n = {
return(slice(_V[n], 0, 'width))
}
-val LookUpRIndex : (int, bits(5)) -> int effect {escape, undef}
+val LookUpRIndex : (int, bits(5)) -> range(0,30) effect {escape, undef}
function LookUpRIndex ('n, mode) = {
assert(n >= 0 & n <= 14, "((n >= 0) && (n <= 14))");
@@ -1840,7 +1840,9 @@ function LookUpRIndex ('n, mode) = {
14 => result = RBankSelect(mode, 14, 30, 16, 18, 20, 22, 14),
_ => result = n
};
- return(result)
+ let 'result2 = result;
+ assert(result2 >= 0 & result2 <= 30);
+ return(result2)
}
val LowestSetBit : forall ('N : Int), 'N >= 0. bits('N) -> int
@@ -2325,7 +2327,7 @@ val IsZeroBit : forall ('N : Int), 'N >= 0 & 1 >= 0. bits('N) -> bits(1)
function IsZeroBit x = return(if IsZero(x) then 0b1 else 0b0)
-val AddWithCarry : forall ('N : Int), 'N >= 0 & 'N >= 0 & 1 >= 0 & 'N >= 0 & 4 >= 0.
+val AddWithCarry : forall ('N : Int), 'N > 0 & 'N >= 0 & 1 >= 0 & 'N >= 0 & 4 >= 0.
(bits('N), bits('N), bits(1)) -> (bits('N), bits(4))
function AddWithCarry (x, y, carry_in) = {
@@ -6131,7 +6133,7 @@ function AddPAC (ptr, modifier, K, data) = {
selbit = if (HaveEL(EL2) & [TCR_EL2[38]] == 0b1) & [TCR_EL1[52]] == 0b0 | (HaveEL(EL2) & [TCR_EL2[37]] == 0b1) & [TCR_EL1[51]] == 0b0 then [ptr[55]] else [ptr[63]]
else selbit = if tbi then [ptr[55]] else [ptr[63]];
let 'bottom_PAC_bit : {'n, true. atom('n)} = ex_int(CalculateBottomPACBit(ptr, selbit));
- assert(constraint('bottom_PAC_bit <= 55));
+ assert(constraint(0 <= 'bottom_PAC_bit <= 55));
extfield = replicate_bits(selbit, 64);
if tbi then
ext_ptr = (ptr[63 .. 56] @ extfield[(negate(bottom_PAC_bit) + 56) - 1 .. 0]) @ ptr[bottom_PAC_bit - 1 .. 0]
@@ -6975,6 +6977,7 @@ function AArch64_MaybeZeroRegisterUppers () = {
};
foreach (n from first to last by 1 in inc)
if (n != 15 | include_R15_name) & ConstrainUnpredictableBool(Unpredictable_ZEROUPPER) then {
+ assert(0 <= n & n <= 30);
__tmp_3 : bits(64) = _R[n];
__tmp_3 = __SetSlice_bits(64, 32, __tmp_3, 32, Zeros());
_R[n] = __tmp_3
@@ -7710,10 +7713,10 @@ function AArch64_StateMatch (SSC__arg, HMC__arg, PxC__arg, linked__arg, LBN, isb
priv_match : bool = undefined;
if ~(ispriv) & ~(isbreakpnt) then priv_match = EL0_match
else match PSTATE.EL {
- EL3 => priv_match = EL3_match,
- EL2 => priv_match = EL2_match,
- EL1 => priv_match = EL1_match,
- EL0 => priv_match = EL0_match
+ ? if ? == EL3 => priv_match = EL3_match,
+ ? if ? == EL2 => priv_match = EL2_match,
+ ? if ? == EL1 => priv_match = EL1_match,
+ ? if ? == EL0 => priv_match = EL0_match
};
security_state_match : bool = undefined;
match SSC {
@@ -8017,20 +8020,20 @@ function Strip (A, data) = {
else
original_ptr = slice(extfield, 0, negate(bottom_PAC_bit) + 64) @ slice(A, 0, bottom_PAC_bit);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
TrapEL2 = false;
TrapEL3 = false
}
@@ -8065,23 +8068,23 @@ function AuthIB (X, Y) = {
Enable : bits(1) = undefined;
APIBKey_EL1 : bits(128) = slice(APIBKeyHi_EL1, 0, 64) @ slice(APIBKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[30]] else [SCTLR_EL2[30]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[30]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[30]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[30]];
TrapEL2 = false;
TrapEL3 = false
@@ -8139,23 +8142,23 @@ function AuthIA (X, Y) = {
Enable : bits(1) = undefined;
APIAKey_EL1 : bits(128) = slice(APIAKeyHi_EL1, 0, 64) @ slice(APIAKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[31]] else [SCTLR_EL2[31]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[31]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[31]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[31]];
TrapEL2 = false;
TrapEL3 = false
@@ -8226,23 +8229,23 @@ function AuthDB (X, Y) = {
Enable : bits(1) = undefined;
APDBKey_EL1 : bits(128) = slice(APDBKeyHi_EL1, 0, 64) @ slice(APDBKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[13]] else [SCTLR_EL2[13]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[13]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[13]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[13]];
TrapEL2 = false;
TrapEL3 = false
@@ -8269,23 +8272,23 @@ function AuthDA (X, Y) = {
Enable : bits(1) = undefined;
APDAKey_EL1 : bits(128) = slice(APDAKeyHi_EL1, 0, 64) @ slice(APDAKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[27]] else [SCTLR_EL2[27]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[27]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[27]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[27]];
TrapEL2 = false;
TrapEL3 = false
@@ -8312,23 +8315,23 @@ function AddPACIB (X, Y) = {
Enable : bits(1) = undefined;
APIBKey_EL1 : bits(128) = slice(APIBKeyHi_EL1, 0, 64) @ slice(APIBKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[30]] else [SCTLR_EL2[30]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[30]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[30]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[30]];
TrapEL2 = false;
TrapEL3 = false
@@ -8386,23 +8389,23 @@ function AddPACIA (X, Y) = {
Enable : bits(1) = undefined;
APIAKey_EL1 : bits(128) = slice(APIAKeyHi_EL1, 0, 64) @ slice(APIAKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[31]] else [SCTLR_EL2[31]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[31]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[31]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[31]];
TrapEL2 = false;
TrapEL3 = false
@@ -8459,20 +8462,20 @@ function AddPACGA (X, Y) = {
TrapEL3 : bool = undefined;
APGAKey_EL1 : bits(128) = slice(APGAKeyHi_EL1, 0, 64) @ slice(APGAKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
TrapEL2 = false;
TrapEL3 = false
}
@@ -8498,23 +8501,23 @@ function AddPACDB (X, Y) = {
Enable : bits(1) = undefined;
APDBKey_EL1 : bits(128) = slice(APDBKeyHi_EL1, 0, 64) @ slice(APDBKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[13]] else [SCTLR_EL2[13]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[13]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[13]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[13]];
TrapEL2 = false;
TrapEL3 = false
@@ -8541,23 +8544,23 @@ function AddPACDA (X, Y) = {
Enable : bits(1) = undefined;
APDAKey_EL1 : bits(128) = slice(APDAKeyHi_EL1, 0, 64) @ slice(APDAKeyLo_EL1, 0, 64);
match PSTATE.EL {
- EL0 => {
+ ? if ? == EL0 => {
IsEL1Regime : bool = (~(HaveEL(EL2)) | [HCR_EL2[27]] == 0b0) | [HCR_EL2[34]] == 0b0;
Enable = if IsEL1Regime then [SCTLR_EL1[27]] else [SCTLR_EL2[27]];
TrapEL2 = ((HaveEL(EL2) & IsEL1Regime) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL1 => {
+ ? if ? == EL1 => {
Enable = [SCTLR_EL1[27]];
TrapEL2 = (HaveEL(EL2) & ~(IsSecure())) & [HCR_EL2[41]] == 0b0;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL2 => {
+ ? if ? == EL2 => {
Enable = [SCTLR_EL2[27]];
TrapEL2 = false;
TrapEL3 = HaveEL(EL3) & [SCR_EL3[17]] == 0b0
},
- EL3 => {
+ ? if ? == EL3 => {
Enable = [SCTLR_EL3[27]];
TrapEL2 = false;
TrapEL3 = false
@@ -9194,7 +9197,7 @@ function aarch64_vector_transfer_integer_dup ('d, 'datasize, 'elements, 'esize,
val aarch64_vector_shift_right_sisd : (bool, int, int, int, int, int, bool, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_shift_right_sisd (accumulate, 'd, 'datasize, 'elements, 'esize, 'n, round, 'shift, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -9216,7 +9219,7 @@ function aarch64_vector_shift_right_sisd (accumulate, 'd, 'datasize, 'elements,
val aarch64_vector_shift_rightnarrow_uniform_sisd : (int, int, int, int, int, int, bool, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_shift_rightnarrow_uniform_sisd ('d, 'datasize, 'elements, 'esize, 'n, 'part, round, 'shift, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -9240,7 +9243,7 @@ function aarch64_vector_shift_rightnarrow_uniform_sisd ('d, 'datasize, 'elements
val aarch64_vector_shift_rightnarrow_nonuniform_sisd : (int, int, int, int, int, int, bool, int) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_shift_rightnarrow_nonuniform_sisd ('d, 'datasize, 'elements, 'esize, 'n, 'part, round, 'shift) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -9321,7 +9324,7 @@ function aarch64_vector_shift_left_sisd ('d, 'datasize, 'elements, 'esize, 'n, '
val aarch64_vector_shift_leftsat_sisd : (int, int, bool, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_shift_leftsat_sisd ('d, 'datasize, dst_unsigned, 'elements, 'esize, 'n, 'shift, src_unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -9344,7 +9347,7 @@ function aarch64_vector_shift_leftsat_sisd ('d, 'datasize, dst_unsigned, 'elemen
val aarch64_vector_shift_leftlong : (int, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_shift_leftlong ('d, 'datasize, 'elements, 'esize, 'n, 'part, 'shift, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -9422,7 +9425,7 @@ function aarch64_vector_shift_conv_float_sisd ('d, 'datasize, 'elements, 'esize,
val aarch64_vector_reduce_intmax : (int, int, int, int, bool, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_reduce_intmax ('d, 'datasize, 'elements, 'esize, min, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -9565,7 +9568,7 @@ function aarch64_vector_reduce_add_simd ('d, 'datasize, 'esize, 'n, op) = {
val aarch64_vector_reduce_addlong : (int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_reduce_addlong ('d, 'datasize, 'elements, 'esize, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -9763,7 +9766,7 @@ function vector_arithmetic_unary_special_frecpx_decode (U, sz, Rn, Rd) = {
val aarch64_vector_arithmetic_unary_shift : (int, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_shift ('d, 'datasize, 'elements, 'esize, 'n, 'part, 'shift, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10062,7 +10065,7 @@ function vector_arithmetic_unary_float_narrow_decode (Q, U, sz, Rn, Rd) = {
val aarch64_vector_arithmetic_unary_extract_sqxtun_sisd : (int, int, int, int, int, int) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_extract_sqxtun_sisd ('d, 'datasize, 'elements, 'esize, 'n, 'part) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10085,7 +10088,7 @@ function aarch64_vector_arithmetic_unary_extract_sqxtun_sisd ('d, 'datasize, 'el
val aarch64_vector_arithmetic_unary_extract_sat_sisd : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_extract_sat_sisd ('d, 'datasize, 'elements, 'esize, 'n, 'part, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10127,7 +10130,7 @@ function aarch64_vector_arithmetic_unary_extract_nosat ('d, 'datasize, 'elements
val aarch64_vector_arithmetic_unary_diffneg_sat_sisd : (int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_diffneg_sat_sisd ('d, 'datasize, 'elements, 'esize, 'n, neg) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10164,7 +10167,7 @@ function vector_arithmetic_unary_diffneg_sat_sisd_decode (U, size, Rn, Rd) = {
val aarch64_vector_arithmetic_unary_diffneg_int_sisd : (int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_diffneg_int_sisd ('d, 'datasize, 'elements, 'esize, 'n, neg) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10221,7 +10224,7 @@ function aarch64_vector_arithmetic_unary_cnt ('d, 'datasize, 'elements, 'esize,
val aarch64_vector_arithmetic_unary_cmp_int_lessthan_sisd : (CompareOp, int, int, int, int, int) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_cmp_int_lessthan_sisd (comparison, 'd, 'datasize, 'elements, 'esize, 'n) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10248,7 +10251,7 @@ function aarch64_vector_arithmetic_unary_cmp_int_lessthan_sisd (comparison, 'd,
val aarch64_vector_arithmetic_unary_cmp_int_bulk_sisd : (CompareOp, int, int, int, int, int) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_cmp_int_bulk_sisd (comparison, 'd, 'datasize, 'elements, 'esize, 'n) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10382,7 +10385,7 @@ function aarch64_vector_arithmetic_unary_clsz (countop, 'd, 'datasize, 'elements
val aarch64_vector_arithmetic_unary_add_saturating_sisd : (int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_add_saturating_sisd ('d, 'datasize, 'elements, 'esize, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10421,7 +10424,7 @@ function vector_arithmetic_unary_add_saturating_sisd_decode (U, size, Rn, Rd) =
val aarch64_vector_arithmetic_unary_add_pairwise : (bool, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_unary_add_pairwise (acc, 'd, 'datasize, 'elements, 'esize, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10445,7 +10448,7 @@ function aarch64_vector_arithmetic_unary_add_pairwise (acc, 'd, 'datasize, 'elem
val aarch64_vector_arithmetic_binary_uniform_sub_saturating_sisd : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_sub_saturating_sisd ('d, 'datasize, 'elements, 'esize, 'm, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10487,7 +10490,7 @@ function vector_arithmetic_binary_uniform_sub_saturating_sisd_decode (U, size, R
val aarch64_vector_arithmetic_binary_uniform_sub_int : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_sub_int ('d, 'datasize, 'elements, 'esize, 'm, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10573,7 +10576,7 @@ function aarch64_vector_arithmetic_binary_uniform_sub_fp16_simd (abs, 'd, 'datas
val aarch64_vector_arithmetic_binary_uniform_shift_sisd : (int, int, int, int, int, int, bool, bool, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_shift_sisd ('d, 'datasize, 'elements, 'esize, 'm, 'n, rounding, saturating, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10696,7 +10699,7 @@ function aarch64_vector_arithmetic_binary_uniform_mul_int_product ('d, 'datasize
val aarch64_vector_arithmetic_binary_uniform_mul_int_doubling_sisd : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_mul_int_doubling_sisd ('d, 'datasize, 'elements, 'esize, 'm, 'n, rounding) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10725,7 +10728,7 @@ function aarch64_vector_arithmetic_binary_uniform_mul_int_doubling_sisd ('d, 'da
val aarch64_vector_arithmetic_binary_uniform_mul_int_doubling_accum_sisd : (int, int, int, int, int, int, bool, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_mul_int_doubling_accum_sisd ('d, 'datasize, 'elements, 'esize, 'm, 'n, rounding, sub_op) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10758,7 +10761,7 @@ function aarch64_vector_arithmetic_binary_uniform_mul_int_doubling_accum_sisd ('
val aarch64_vector_arithmetic_binary_uniform_mul_int_dotp : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_mul_int_dotp ('d, 'datasize, 'elements, 'esize, 'm, 'n, signed) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize >= 4), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10945,7 +10948,7 @@ function aarch64_vector_arithmetic_binary_uniform_mul_fp_complex ('d, 'datasize,
val aarch64_vector_arithmetic_binary_uniform_maxmin_single : (int, int, int, int, int, bool, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_maxmin_single ('d, 'datasize, 'elements, 'esize, 'm, minimum, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -10969,7 +10972,7 @@ function aarch64_vector_arithmetic_binary_uniform_maxmin_single ('d, 'datasize,
val aarch64_vector_arithmetic_binary_uniform_maxmin_pair : (int, int, int, int, int, bool, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_maxmin_pair ('d, 'datasize, 'elements, 'esize, 'm, minimum, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11159,7 +11162,7 @@ function aarch64_vector_arithmetic_binary_uniform_divfp16 ('d, 'datasize, 'eleme
val aarch64_vector_arithmetic_binary_uniform_diff : (bool, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_diff (accumulate, 'd, 'datasize, 'elements, 'esize, 'm, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11184,7 +11187,7 @@ function aarch64_vector_arithmetic_binary_uniform_diff (accumulate, 'd, 'datasiz
val aarch64_vector_arithmetic_binary_uniform_cmp_int_sisd : (bool, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_cmp_int_sisd (cmp_eq, 'd, 'datasize, 'elements, 'esize, 'm, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11309,7 +11312,7 @@ function aarch64_vector_arithmetic_binary_uniform_add_wrapping_pair ('d, 'datasi
val aarch64_vector_arithmetic_binary_uniform_add_saturating_sisd : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_add_saturating_sisd ('d, 'datasize, 'elements, 'esize, 'm, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11351,7 +11354,7 @@ function vector_arithmetic_binary_uniform_add_saturating_sisd_decode (U, size, R
val aarch64_vector_arithmetic_binary_uniform_add_halving_truncating : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_add_halving_truncating ('d, 'datasize, 'elements, 'esize, 'm, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11375,7 +11378,7 @@ function aarch64_vector_arithmetic_binary_uniform_add_halving_truncating ('d, 'd
val aarch64_vector_arithmetic_binary_uniform_add_halving_rounding : (int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_uniform_add_halving_rounding ('d, 'datasize, 'elements, 'esize, 'm, 'n, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11458,7 +11461,7 @@ val aarch64_vector_arithmetic_binary_element_mul_long : (int, int, int, int, int
function aarch64_vector_arithmetic_binary_element_mul_long ('d, 'datasize, 'elements, 'esize, 'idxdsize, 'index, 'm, 'n, 'part, unsigned) = {
assert(constraint('idxdsize >= 0), "idxdsize constraint");
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11508,7 +11511,7 @@ val aarch64_vector_arithmetic_binary_element_mul_high_sisd : (int, int, int, int
function aarch64_vector_arithmetic_binary_element_mul_high_sisd ('d, 'datasize, 'elements, 'esize, 'idxdsize, 'index, 'm, 'n, round) = {
assert(constraint('idxdsize >= 0), "idxdsize constraint");
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11538,7 +11541,7 @@ val aarch64_vector_arithmetic_binary_element_mul_fp16_sisd : (int, int, int, int
function aarch64_vector_arithmetic_binary_element_mul_fp16_sisd ('d, 'datasize, 'elements, 'esize, 'idxdsize, 'index, 'm, mulx_op, 'n) = {
assert(constraint('idxdsize >= 0), "idxdsize constraint");
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11560,7 +11563,7 @@ val aarch64_vector_arithmetic_binary_element_mul_double_sisd : (int, int, int, i
function aarch64_vector_arithmetic_binary_element_mul_double_sisd ('d, 'datasize, 'elements, 'esize, 'idxdsize, 'index, 'm, 'n, 'part) = {
assert(constraint('idxdsize >= 0), "idxdsize constraint");
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11587,7 +11590,7 @@ val aarch64_vector_arithmetic_binary_element_mulacc_long : (int, int, int, int,
function aarch64_vector_arithmetic_binary_element_mulacc_long ('d, 'datasize, 'elements, 'esize, 'idxdsize, 'index, 'm, 'n, 'part, sub_op, unsigned) = {
assert(constraint('idxdsize >= 0), "idxdsize constraint");
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11639,7 +11642,7 @@ val aarch64_vector_arithmetic_binary_element_mulacc_high_sisd : (int, int, int,
function aarch64_vector_arithmetic_binary_element_mulacc_high_sisd ('d, 'datasize, 'elements, 'esize, 'idxdsize, 'index, 'm, 'n, rounding, sub_op) = {
assert(constraint('idxdsize >= 0), "idxdsize constraint");
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11697,7 +11700,7 @@ val aarch64_vector_arithmetic_binary_element_mulacc_double_sisd : (int, int, int
function aarch64_vector_arithmetic_binary_element_mulacc_double_sisd ('d, 'datasize, 'elements, 'esize, 'idxdsize, 'index, 'm, 'n, 'part, sub_op) = {
assert(constraint('idxdsize >= 0), "idxdsize constraint");
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11779,7 +11782,7 @@ function aarch64_vector_arithmetic_binary_element_mulacc_complex ('d, 'datasize,
val aarch64_vector_arithmetic_binary_element_dotp : (int, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_element_dotp ('d, 'datasize, 'elements, 'esize, 'index, 'm, 'n, signed) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize >= 4), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11810,7 +11813,7 @@ function aarch64_vector_arithmetic_binary_element_dotp ('d, 'datasize, 'elements
val aarch64_vector_arithmetic_binary_disparate_mul_product : (int, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_disparate_mul_product ('d, 'datasize, 'elements, 'esize, 'm, 'n, 'part, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11854,7 +11857,7 @@ function aarch64_vector_arithmetic_binary_disparate_mul_poly ('d, 'datasize, 'el
val aarch64_vector_arithmetic_binary_disparate_mul_double_sisd : (int, int, int, int, int, int, int) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_disparate_mul_double_sisd ('d, 'datasize, 'elements, 'esize, 'm, 'n, 'part) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11880,7 +11883,7 @@ function aarch64_vector_arithmetic_binary_disparate_mul_double_sisd ('d, 'datasi
val aarch64_vector_arithmetic_binary_disparate_mul_dmacc_sisd : (int, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_disparate_mul_dmacc_sisd ('d, 'datasize, 'elements, 'esize, 'm, 'n, 'part, sub_op) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11912,7 +11915,7 @@ function aarch64_vector_arithmetic_binary_disparate_mul_dmacc_sisd ('d, 'datasiz
val aarch64_vector_arithmetic_binary_disparate_mul_accum : (int, int, int, int, int, int, int, bool, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_disparate_mul_accum ('d, 'datasize, 'elements, 'esize, 'm, 'n, 'part, sub_op, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11939,7 +11942,7 @@ function aarch64_vector_arithmetic_binary_disparate_mul_accum ('d, 'datasize, 'e
val aarch64_vector_arithmetic_binary_disparate_diff : (bool, int, int, int, int, int, int, int, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_disparate_diff (accumulate, 'd, 'datasize, 'elements, 'esize, 'm, 'n, 'part, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -11964,7 +11967,7 @@ function aarch64_vector_arithmetic_binary_disparate_diff (accumulate, 'd, 'datas
val aarch64_vector_arithmetic_binary_disparate_addsub_wide : (int, int, int, int, int, int, int, bool, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_disparate_addsub_wide ('d, 'datasize, 'elements, 'esize, 'm, 'n, 'part, sub_op, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
@@ -12014,7 +12017,7 @@ function aarch64_vector_arithmetic_binary_disparate_addsub_narrow ('d, 'datasize
val aarch64_vector_arithmetic_binary_disparate_addsub_long : (int, int, int, int, int, int, int, bool, bool) -> unit effect {escape, rreg, undef, wreg}
function aarch64_vector_arithmetic_binary_disparate_addsub_long ('d, 'datasize, 'elements, 'esize, 'm, 'n, 'part, sub_op, unsigned) = {
- assert(constraint('esize >= 0), "esize constraint");
+ assert(constraint('esize > 0), "esize constraint");
assert(constraint('elements >= 1), "elements constraint");
let 'dbytes = ex_int(datasize / 8);
assert(constraint('datasize in {8, 16, 32, 64, 128}), "datasize constraint");
diff --git a/aarch64/no_devices.sail b/aarch64/no_devices.sail
index 57dad4e2..b25cb6c5 100644
--- a/aarch64/no_devices.sail
+++ b/aarch64/no_devices.sail
@@ -6,10 +6,10 @@ val __InitRAM : forall 'm. (atom('m), int, bits('m), bits(8)) -> unit
function __InitRAM (_, _, _, _) = ()
-val ___ReadRAM = "read_ram" : forall 'n 'm.
+val ___ReadRAM = "read_ram" : forall 'n 'm, 'n >= 0.
(atom('m), atom('n), bits('m), bits('m)) -> bits(8 * 'n) effect {rmem}
-val __ReadRAM : forall 'n 'm.
+val __ReadRAM : forall 'n 'm, 'n >= 0.
(atom('m), atom('n), bits('m), bits('m)) -> bits(8 * 'n) effect {rmem}
function __ReadRAM(addr_length, bytes, hex_ram, addr) =
diff --git a/aarch64/prelude.sail b/aarch64/prelude.sail
index 8cd18fac..3e8c3399 100755
--- a/aarch64/prelude.sail
+++ b/aarch64/prelude.sail
@@ -148,7 +148,7 @@ val UInt = {
val SInt = {
c: "sail_signed",
_: "sint"
-} : forall 'n. bits('n) -> range(- (2 ^ ('n - 1)), 2 ^ ('n - 1) - 1)
+} : forall 'n, 'n > 0. bits('n) -> range(- (2 ^ ('n - 1)), 2 ^ ('n - 1) - 1)
val hex_slice = "hex_slice" : forall 'n 'm. (string, atom('n), atom('m)) -> bits('n - 'm) effect {escape}
@@ -159,9 +159,9 @@ val __SetSlice_int = "set_slice_int" : forall 'w. (atom('w), int, int, bits('w))
val __raw_SetSlice_int : forall 'w. (atom('w), int, int, bits('w)) -> int
-val __raw_GetSlice_int = "get_slice_int" : forall 'w /*, 'w >= 0*/. (atom('w), int, int) -> bits('w)
+val __raw_GetSlice_int = "get_slice_int" : forall 'w, 'w >= 0. (atom('w), int, int) -> bits('w)
-val __GetSlice_int : forall 'n /*, 'n >= 0*/. (atom('n), int, int) -> bits('n)
+val __GetSlice_int : forall 'n, 'n >= 0. (atom('n), int, int) -> bits('n)
function __GetSlice_int (n, m, o) = __raw_GetSlice_int(n, m, o)
|