-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathfeatchk.h
1241 lines (967 loc) · 43.3 KB
/
featchk.h
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
/* FEATCHK.H (C) Copyright Jan Jaeger, 2000-2012 */
/* (C) and others 2013-2023 */
/* Feature definition consistency checks */
/* */
/* Released under "The Q Public License Version 1" */
/* (http://www.hercules-390.org/herclic.html) as modifications to */
/* Hercules. */
/*-------------------------------------------------------------------*/
/* Perform various checks on feature combinations, and set */
/* additional flags to percolate certain features such as */
/* SIE down to lower architecture levels such that these */
/* can include emulation support */
/* */
/* FEATURE_XXXX is defined per architecture mode, and */
/* _FEATURE_XXXX is defined for ALL architecture modes when */
/* FEATURE_XXXX is defined for ANY architecture mode. */
/*-------------------------------------------------------------------*/
#if defined( FEATCHK_DO_DEFINES ) // (pass 1: do #defines)
/*-------------------------------------------------------------------*/
/* PASS 1: remember features */
/*-------------------------------------------------------------------*/
/* In this section of code we simply (for ther most part) #define */
/* the underscore '_FEATURE_XXXX' constant if the non-underscored */
/* 'FEATURE_XXX' constant is #defined. This allows us to detect */
/* the need for a given feature if ANY of the build archtectures */
/* should need it. That is to say, if at least ONE of the build */
/* architectures needs support for a given feature, then we must */
/* enable the code that provides support for that feature regard- */
/* less of whether the current build architecture needs it or not. */
/* You should NOT be checking FEATURE combinations here. That is */
/* done during pass 2. You should only be doing #defines here. */
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
/* Some FEATUREs force other FEATUREs */
/*-------------------------------------------------------------------*/
#if defined( FEATURE_EXTENDED_STORAGE_KEYS )
#define FEATURE_S370E_EXTENDED_ADDRESSING
#endif
/*-------------------------------------------------------------------*/
/* Some build options override/disable certain FEATUREs */
/*-------------------------------------------------------------------*/
#if defined( NO_IEEE_SUPPORT )
#undef FEATURE_037_FP_EXTENSION_FACILITY
#undef FEATURE_BINARY_FLOATING_POINT
#undef FEATURE_FPS_EXTENSIONS
#endif
/*-------------------------------------------------------------------*/
/* Facility-bit FEATUREs */
/*-------------------------------------------------------------------*/
#if defined( FEATURE_000_N3_INSTR_FACILITY )
#define _FEATURE_000_N3_INSTR_FACILITY
#endif
#if defined( FEATURE_001_ZARCH_INSTALLED_FACILITY )
#define _FEATURE_001_ZARCH_INSTALLED_FACILITY
#endif
#if defined( FEATURE_003_DAT_ENHANCE_FACILITY_1 )
#define _FEATURE_003_DAT_ENHANCE_FACILITY_1
#endif
#if defined( FEATURE_004_IDTE_SC_SEGTAB_FACILITY )
#define _FEATURE_004_IDTE_SC_SEGTAB_FACILITY
#endif
#if defined( FEATURE_005_IDTE_SC_REGTAB_FACILITY )
#define _FEATURE_005_IDTE_SC_REGTAB_FACILITY
#endif
#if defined( FEATURE_006_ASN_LX_REUSE_FACILITY )
#define _FEATURE_006_ASN_LX_REUSE_FACILITY
#endif
#if defined( FEATURE_007_STFL_EXTENDED_FACILITY )
#define _FEATURE_007_STFL_EXTENDED_FACILITY
#endif
#if defined( FEATURE_008_ENHANCED_DAT_FACILITY_1 )
#define _FEATURE_008_ENHANCED_DAT_FACILITY_1
#endif
#if defined( FEATURE_009_SENSE_RUN_STATUS_FACILITY )
#define _FEATURE_009_SENSE_RUN_STATUS_FACILITY
#endif
#if defined( FEATURE_010_CONDITIONAL_SSKE_FACILITY )
#define _FEATURE_010_CONDITIONAL_SSKE_FACILITY
#endif
#if defined( FEATURE_011_CONFIG_TOPOLOGY_FACILITY )
#define _FEATURE_011_CONFIG_TOPOLOGY_FACILITY
#endif
#if defined( FEATURE_013_IPTE_RANGE_FACILITY )
#define _FEATURE_013_IPTE_RANGE_FACILITY
#endif
#if defined( FEATURE_014_NONQ_KEY_SET_FACILITY )
#define _FEATURE_014_NONQ_KEY_SET_FACILITY
#endif
#if defined( FEATURE_016_EXT_TRANSL_FACILITY_2 )
#define _FEATURE_016_EXT_TRANSL_FACILITY_2
#endif
#if defined( FEATURE_017_MSA_FACILITY )
#define _FEATURE_017_MSA_FACILITY
#endif
#if defined( FEATURE_018_LONG_DISPL_INST_FACILITY )
#define _FEATURE_018_LONG_DISPL_INST_FACILITY
#endif
#if defined( FEATURE_019_LONG_DISPL_HPERF_FACILITY )
#define _FEATURE_019_LONG_DISPL_HPERF_FACILITY
#endif
#if defined( FEATURE_020_HFP_MULT_ADD_SUB_FACILITY )
#define _FEATURE_020_HFP_MULT_ADD_SUB_FACILITY
#endif
#if defined( FEATURE_021_EXTENDED_IMMED_FACILITY )
#define _FEATURE_021_EXTENDED_IMMED_FACILITY
#endif
#if defined( FEATURE_022_EXT_TRANSL_FACILITY_3 )
#define _FEATURE_022_EXT_TRANSL_FACILITY_3
#endif
#if defined( FEATURE_023_HFP_UNNORM_EXT_FACILITY )
#define _FEATURE_023_HFP_UNNORM_EXT_FACILITY
#endif
#if defined( FEATURE_024_ETF2_ENHANCEMENT_FACILITY )
#define _FEATURE_024_ETF2_ENHANCEMENT_FACILITY
#endif
#if defined( FEATURE_025_STORE_CLOCK_FAST_FACILITY )
#define _FEATURE_025_STORE_CLOCK_FAST_FACILITY
#endif
#if defined( FEATURE_026_PARSING_ENHANCE_FACILITY )
#define _FEATURE_026_PARSING_ENHANCE_FACILITY
#endif
#if defined( FEATURE_027_MVCOS_FACILITY )
#define _FEATURE_027_MVCOS_FACILITY
#endif
#if defined( FEATURE_028_TOD_CLOCK_STEER_FACILITY )
#define _FEATURE_028_TOD_CLOCK_STEER_FACILITY
#endif
#if defined( FEATURE_030_ETF3_ENHANCEMENT_FACILITY )
#define _FEATURE_030_ETF3_ENHANCEMENT_FACILITY
#endif
#if defined( FEATURE_031_EXTRACT_CPU_TIME_FACILITY )
#define _FEATURE_031_EXTRACT_CPU_TIME_FACILITY
#endif
#if defined( FEATURE_032_CSS_FACILITY )
#define _FEATURE_032_CSS_FACILITY
#endif
#if defined( FEATURE_033_CSS_FACILITY_2 )
#define _FEATURE_033_CSS_FACILITY_2
#endif
#if defined( FEATURE_034_GEN_INST_EXTN_FACILITY )
#define _FEATURE_034_GEN_INST_EXTN_FACILITY
#endif
#if defined( FEATURE_035_EXECUTE_EXTN_FACILITY )
#define _FEATURE_035_EXECUTE_EXTN_FACILITY
#endif
#if defined( FEATURE_036_ENH_MONITOR_FACILITY )
#define _FEATURE_036_ENH_MONITOR_FACILITY
#endif
#if defined( FEATURE_037_FP_EXTENSION_FACILITY )
#define _FEATURE_037_FP_EXTENSION_FACILITY
#endif
#if defined( FEATURE_038_OP_CMPSC_FACILITY )
#define _FEATURE_038_OP_CMPSC_FACILITY
#endif
#if defined( FEATURE_040_LOAD_PROG_PARAM_FACILITY )
#define _FEATURE_040_LOAD_PROG_PARAM_FACILITY
#endif
#if defined( FEATURE_041_FPS_ENHANCEMENT_FACILITY )
#define _FEATURE_041_FPS_ENHANCEMENT_FACILITY
#endif
#if defined( FEATURE_041_DFP_ROUNDING_FACILITY )
#define _FEATURE_041_DFP_ROUNDING_FACILITY
#endif
#if defined( FEATURE_041_FPR_GR_TRANSFER_FACILITY )
#define _FEATURE_041_FPR_GR_TRANSFER_FACILITY
#endif
#if defined( FEATURE_041_FPS_SIGN_HANDLING_FACILITY )
#define _FEATURE_041_FPS_SIGN_HANDLING_FACILITY
#endif
#if defined( FEATURE_041_IEEE_EXCEPT_SIM_FACILITY )
#define _FEATURE_041_IEEE_EXCEPT_SIM_FACILITY
#endif
#if defined( FEATURE_042_DFP_FACILITY )
#define _FEATURE_042_DFP_FACILITY
#endif
#if defined( FEATURE_043_DFP_HPERF_FACILITY )
#define _FEATURE_043_DFP_HPERF_FACILITY
#endif
#if defined( FEATURE_044_PFPO_FACILITY )
#define _FEATURE_044_PFPO_FACILITY
#endif
#if defined( FEATURE_045_DISTINCT_OPERANDS_FACILITY )
#define _FEATURE_045_DISTINCT_OPERANDS_FACILITY
#endif
#if defined( FEATURE_045_FAST_BCR_SERIAL_FACILITY )
#define _FEATURE_045_FAST_BCR_SERIAL_FACILITY
#endif
#if defined( FEATURE_045_HIGH_WORD_FACILITY )
#define _FEATURE_045_HIGH_WORD_FACILITY
#endif
#if defined( FEATURE_045_INTERLOCKED_ACCESS_FACILITY_1 )
#define _FEATURE_045_INTERLOCKED_ACCESS_FACILITY_1
#endif
#if defined( FEATURE_045_LOAD_STORE_ON_COND_FACILITY_1 )
#define _FEATURE_045_LOAD_STORE_ON_COND_FACILITY_1
#endif
#if defined( FEATURE_045_POPULATION_COUNT_FACILITY )
#define _FEATURE_045_POPULATION_COUNT_FACILITY
#endif
#if defined( FEATURE_047_CMPSC_ENH_FACILITY )
#define _FEATURE_047_CMPSC_ENH_FACILITY
#endif
#if defined( FEATURE_048_DFP_ZONE_CONV_FACILITY )
#define _FEATURE_048_DFP_ZONE_CONV_FACILITY
#endif
#if defined( FEATURE_049_EXECUTION_HINT_FACILITY )
#define _FEATURE_049_EXECUTION_HINT_FACILITY
#endif
#if defined( FEATURE_049_LOAD_AND_TRAP_FACILITY )
#define _FEATURE_049_LOAD_AND_TRAP_FACILITY
#endif
#if defined( FEATURE_049_PROCESSOR_ASSIST_FACILITY )
#define _FEATURE_049_PROCESSOR_ASSIST_FACILITY
#endif
#if defined( FEATURE_049_MISC_INSTR_EXT_FACILITY_1 )
#define _FEATURE_049_MISC_INSTR_EXT_FACILITY_1
#endif
#if defined( FEATURE_050_CONSTR_TRANSACT_FACILITY )
#define _FEATURE_050_CONSTR_TRANSACT_FACILITY
#endif
#if defined( FEATURE_051_LOCAL_TLB_CLEARING_FACILITY )
#define _FEATURE_051_LOCAL_TLB_CLEARING_FACILITY
#endif
#if defined( FEATURE_052_INTERLOCKED_ACCESS_FACILITY_2 )
#define _FEATURE_052_INTERLOCKED_ACCESS_FACILITY_2
#endif
#if defined( FEATURE_053_LOAD_STORE_ON_COND_FACILITY_2 )
#define _FEATURE_053_LOAD_STORE_ON_COND_FACILITY_2
#endif
#if defined( FEATURE_053_LOAD_ZERO_RIGHTMOST_FACILITY )
#define _FEATURE_053_LOAD_ZERO_RIGHTMOST_FACILITY
#endif
#if defined( FEATURE_054_EE_CMPSC_FACILITY )
#define _FEATURE_054_EE_CMPSC_FACILITY
#endif
#if defined( FEATURE_057_MSA_EXTENSION_FACILITY_5 )
#define _FEATURE_057_MSA_EXTENSION_FACILITY_5
#endif
#if defined( FEATURE_058_MISC_INSTR_EXT_FACILITY_2 )
#define _FEATURE_058_MISC_INSTR_EXT_FACILITY_2
#endif
#if defined( FEATURE_061_MISC_INSTR_EXT_FACILITY_3 )
#define _FEATURE_061_MISC_INSTR_EXT_FACILITY_3
#endif
#if defined( FEATURE_066_RES_REF_BITS_MULT_FACILITY )
#define _FEATURE_066_RES_REF_BITS_MULT_FACILITY
#endif
#if defined( FEATURE_067_CPU_MEAS_COUNTER_FACILITY )
#define _FEATURE_067_CPU_MEAS_COUNTER_FACILITY
#endif
#if defined( FEATURE_068_CPU_MEAS_SAMPLNG_FACILITY )
#define _FEATURE_068_CPU_MEAS_SAMPLNG_FACILITY
#endif
#if defined( FEATURE_073_TRANSACT_EXEC_FACILITY )
#define _FEATURE_073_TRANSACT_EXEC_FACILITY
#endif
#if defined( FEATURE_074_STORE_HYPER_INFO_FACILITY )
#define _FEATURE_074_STORE_HYPER_INFO_FACILITY
#endif
#if defined( FEATURE_075_ACC_EX_FS_INDIC_FACILITY )
#define _FEATURE_075_ACC_EX_FS_INDIC_FACILITY
#endif
#if defined( FEATURE_076_MSA_EXTENSION_FACILITY_3 )
#define _FEATURE_076_MSA_EXTENSION_FACILITY_3
#endif
#if defined( FEATURE_077_MSA_EXTENSION_FACILITY_4 )
#define _FEATURE_077_MSA_EXTENSION_FACILITY_4
#endif
#if defined( FEATURE_078_ENHANCED_DAT_FACILITY_2 )
#define _FEATURE_078_ENHANCED_DAT_FACILITY_2
#endif
#if defined( FEATURE_080_DFP_PACK_CONV_FACILITY )
#define _FEATURE_080_DFP_PACK_CONV_FACILITY
#endif
#if defined( FEATURE_081_PPA_IN_ORDER_FACILITY )
#define _FEATURE_081_PPA_IN_ORDER_FACILITY
#endif
#if defined( FEATURE_129_ZVECTOR_FACILITY )
#define _FEATURE_129_ZVECTOR_FACILITY
#endif
#if defined( FEATURE_130_INSTR_EXEC_PROT_FACILITY )
#define _FEATURE_130_INSTR_EXEC_PROT_FACILITY
#endif
#if defined( FEATURE_131_SIDE_EFFECT_ACCESS_FACILITY )
#define _FEATURE_131_SIDE_EFFECT_ACCESS_FACILITY
#endif
#if defined( FEATURE_131_ENH_SUPP_ON_PROT_2_FACILITY )
#define _FEATURE_131_ENH_SUPP_ON_PROT_2_FACILITY
#endif
#if defined( FEATURE_133_GUARDED_STORAGE_FACILITY )
#define _FEATURE_133_GUARDED_STORAGE_FACILITY
#endif
#if defined( FEATURE_134_ZVECTOR_PACK_DEC_FACILITY )
#define _FEATURE_134_ZVECTOR_PACK_DEC_FACILITY
#endif
#if defined( FEATURE_135_ZVECTOR_ENH_FACILITY_1 )
#define _FEATURE_135_ZVECTOR_ENH_FACILITY_1
#endif
#if defined( FEATURE_138_CONFIG_ZARCH_MODE_FACILITY )
#define _FEATURE_138_CONFIG_ZARCH_MODE_FACILITY
#endif
#if defined( FEATURE_139_MULTIPLE_EPOCH_FACILITY )
#define _FEATURE_139_MULTIPLE_EPOCH_FACILITY
#endif
#if defined( FEATURE_142_ST_CPU_COUNTER_MULT_FACILITY )
#define _FEATURE_142_ST_CPU_COUNTER_MULT_FACILITY
#endif
#if defined( FEATURE_144_TEST_PEND_EXTERNAL_FACILITY )
#define _FEATURE_144_TEST_PEND_EXTERNAL_FACILITY
#endif
#if defined( FEATURE_145_INS_REF_BITS_MULT_FACILITY )
#define _FEATURE_145_INS_REF_BITS_MULT_FACILITY
#endif
#if defined( FEATURE_146_MSA_EXTENSION_FACILITY_8 )
#define _FEATURE_146_MSA_EXTENSION_FACILITY_8
#endif
#if defined( FEATURE_148_VECTOR_ENH_FACILITY_2 )
#define _FEATURE_148_VECTOR_ENH_FACILITY_2
#endif
#if defined( FEATURE_149_MOVEPAGE_SETKEY_FACILITY )
#define _FEATURE_149_MOVEPAGE_SETKEY_FACILITY
#endif
#if defined( FEATURE_150_ENH_SORT_FACILITY )
#define _FEATURE_150_ENH_SORT_FACILITY
#endif
#if defined( FEATURE_151_DEFLATE_CONV_FACILITY )
#define _FEATURE_151_DEFLATE_CONV_FACILITY
#endif
#if defined( FEATURE_152_VECT_PACKDEC_ENH_FACILITY )
#define _FEATURE_152_VECT_PACKDEC_ENH_FACILITY
#endif
#if defined( FEATURE_155_MSA_EXTENSION_FACILITY_9 )
#define _FEATURE_155_MSA_EXTENSION_FACILITY_9
#endif
#if defined( FEATURE_158_ULTRAV_CALL_FACILITY )
#define _FEATURE_158_ULTRAV_CALL_FACILITY
#endif
#if defined( FEATURE_161_SEC_EXE_UNPK_FACILITY )
#define _FEATURE_161_SEC_EXE_UNPK_FACILITY
#endif
#if defined( FEATURE_165_NNET_ASSIST_FACILITY )
#define _FEATURE_165_NNET_ASSIST_FACILITY
#endif
#if defined( FEATURE_168_ESA390_COMPAT_MODE_FACILITY )
#define _FEATURE_168_ESA390_COMPAT_MODE_FACILITY
#endif
#if defined( FEATURE_169_SKEY_REMOVAL_FACILITY )
#define _FEATURE_169_SKEY_REMOVAL_FACILITY
#endif
#if defined( FEATURE_192_VECT_PACKDEC_ENH_2_FACILITY )
#define _FEATURE_192_VECT_PACKDEC_ENH_2_FACILITY
#endif
#if defined( FEATURE_193_BEAR_ENH_FACILITY )
#define _FEATURE_193_BEAR_ENH_FACILITY
#endif
#if defined( FEATURE_194_RESET_DAT_PROT_FACILITY )
#define _FEATURE_194_RESET_DAT_PROT_FACILITY
#endif
#if defined( FEATURE_196_PROC_ACT_FACILITY )
#define _FEATURE_196_PROC_ACT_FACILITY
#endif
#if defined( FEATURE_197_PROC_ACT_EXT_1_FACILITY )
#define _FEATURE_197_PROC_ACT_EXT_1_FACILITY
#endif
/*-------------------------------------------------------------------*/
/* Non-facility-bit FEATUREs */
/*-------------------------------------------------------------------*/
#if defined( FEATURE_2K_STORAGE_KEYS )
#define _FEATURE_2K_STORAGE_KEYS
#endif
#if defined( FEATURE_4K_STORAGE_KEYS )
#define _FEATURE_4K_STORAGE_KEYS
#endif
#if defined( FEATURE_ADDRESS_LIMIT_CHECKING )
#define _FEATURE_ADDRESS_LIMIT_CHECKING
#endif
#if defined( FEATURE_BASIC_STORAGE_KEYS )
#define _FEATURE_BASIC_STORAGE_KEYS
#endif
#if defined( FEATURE_CMPSC )
#define _FEATURE_CMPSC
#endif
#if defined( FEATURE_EXTENDED_STORAGE_KEYS )
#define _FEATURE_EXTENDED_STORAGE_KEYS
#endif
#if defined( FEATURE_370_EXTENSION )
#define _FEATURE_370_EXTENSION
#endif
#if defined( FEATURE_CHANNEL_SUBSYSTEM )
#define _FEATURE_CHANNEL_SUBSYSTEM
#endif
#if defined( FEATURE_CPU_RECONFIG )
#define _FEATURE_CPU_RECONFIG
#endif
#if defined( FEATURE_ECPSVM )
#define _FEATURE_ECPSVM
#endif
#if defined( FEATURE_EMULATE_VM )
#define _FEATURE_EMULATE_VM
#endif
#if defined( FEATURE_EXPANDED_STORAGE )
#define _FEATURE_EXPANDED_STORAGE
#endif
#if defined( FEATURE_EXPEDITED_SIE_SUBSET )
#define _FEATURE_EXPEDITED_SIE_SUBSET
#endif
#if defined( FEATURE_EXTERNAL_INTERRUPT_ASSIST )
#define _FEATURE_EXTERNAL_INTERRUPT_ASSIST
#endif
#if defined( FEATURE_HARDWARE_LOADER )
#define _FEATURE_HARDWARE_LOADER
#endif
#if defined( FEATURE_HERCULES_DIAGCALLS )
#define _FEATURE_HERCULES_DIAGCALLS
#endif
#if defined( FEATURE_HOST_RESOURCE_ACCESS_FACILITY )
#define _FEATURE_HOST_RESOURCE_ACCESS_FACILITY
#endif
#if defined( FEATURE_HYPERVISOR )
#define _FEATURE_HYPERVISOR
#endif
#if defined( FEATURE_INTEGRATED_3270_CONSOLE )
#define _FEATURE_INTEGRATED_3270_CONSOLE
#endif
#if defined( FEATURE_INTEGRATED_ASCII_CONSOLE )
#define _FEATURE_INTEGRATED_ASCII_CONSOLE
#endif
#if defined( FEATURE_INTERVAL_TIMER )
#define _FEATURE_INTERVAL_TIMER
#endif
#if defined( FEATURE_IO_ASSIST )
#define _FEATURE_IO_ASSIST
#endif
#if defined( FEATURE_MSA_EXTENSION_FACILITY_1 )
#define _FEATURE_MSA_EXTENSION_FACILITY_1
#endif
#if defined( FEATURE_MSA_EXTENSION_FACILITY_2 )
#define _FEATURE_MSA_EXTENSION_FACILITY_2
#endif
#if defined( FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE )
#define _FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE
#endif
#if defined( FEATURE_NEW_ZARCH_ONLY_INSTRUCTIONS ) // 'N' instructions
#define _FEATURE_NEW_ZARCH_ONLY_INSTRUCTIONS
#endif
#if defined( FEATURE_PER )
#define _FEATURE_PER
#endif
#if defined( FEATURE_PER1 )
#define _FEATURE_PER1
#endif
#if defined( FEATURE_PER2 )
#define _FEATURE_PER2
#endif
#if defined( FEATURE_PER3 )
#define _FEATURE_PER3
#endif
#if defined( FEATURE_PER_STORAGE_KEY_ALTERATION_FACILITY )
#define _FEATURE_PER_STORAGE_KEY_ALTERATION_FACILITY
#endif
#if defined( FEATURE_PER_ZERO_ADDRESS_DETECTION_FACILITY )
#define _FEATURE_PER_ZERO_ADDRESS_DETECTION_FACILITY
#endif
#if defined( FEATURE_QDIO_TDD )
#define _FEATURE_QDIO_TDD
#endif
#if defined( FEATURE_QDIO_THININT )
#define _FEATURE_QDIO_THININT
#endif
#if defined( FEATURE_QEBSM )
#define _FEATURE_QEBSM
#endif
#if defined( FEATURE_REGION_RELOCATE )
#define _FEATURE_REGION_RELOCATE
#endif
#if defined( FEATURE_S370_S390_VECTOR_FACILITY )
#define _FEATURE_S370_S390_VECTOR_FACILITY
#endif
#if defined( FEATURE_SCSI_IPL )
#define _FEATURE_SCSI_IPL
#endif
#if defined( FEATURE_SVS )
#define _FEATURE_SVS
#endif
#if defined( FEATURE_SYSTEM_CONSOLE )
#define _FEATURE_SYSTEM_CONSOLE
#endif
#if defined( FEATURE_VM_BLOCKIO )
#define _FEATURE_VM_BLOCKIO
#endif
#if defined( FEATURE_WAITSTATE_ASSIST )
#define _FEATURE_WAITSTATE_ASSIST
#endif
#if defined( FEATURE_TCPIP_EXTENSION )
#define _FEATURE_TCPIP_EXTENSION
#endif
#if defined( FEATURE_ZVM_ESSA )
#define _FEATURE_ZVM_ESSA
#endif
/*-------------------------------------------------------------------*/
/* PROGRAMMING NOTE */
/*-------------------------------------------------------------------*/
/* Ideally, none of the #defines made in pass 1 should be dependent */
/* on any other #define (i.e. your #if statements should not have */
/* multiple conditions ('&&' or '||') or be dependent on the order */
/* (sequence) that #defines are being made). The below tiny section */
/* of code pertaining to SIE appears to be an exception to the rule. */
/*-------------------------------------------------------------------*/
#if defined( FEATURE_SIE )
#define _FEATURE_SIE // (370/390/900 SIE)
#if defined( FEATURE_001_ZARCH_INSTALLED_FACILITY )
#define _FEATURE_ZSIE // (900 SIE)
#endif
#if defined( FEATURE_PROTECTION_INTERCEPTION_CONTROL )
#define _FEATURE_PROTECTION_INTERCEPTION_CONTROL
#endif
#if defined( FEATURE_STORAGE_KEY_ASSIST )
#define _FEATURE_STORAGE_KEY_ASSIST
#endif
#endif
/*-------------------------------------------------------------------*/
/* Build architecture #defines */
/*-------------------------------------------------------------------*/
/* _nnn (_370, _390, _900) are architectures present in the build. */
/* _ARCH_NUM_n controls self including for arch-dependent compiles. */
/* _ARCH_nnn_IDX is the index for each arch within various tables. */
/*-------------------------------------------------------------------*/
#if !defined( OPTION_370_MODE ) \
&& !defined( OPTION_390_MODE ) \
&& !defined( OPTION_900_MODE )
#error At least one of OPTION_370_MODE, OPTION_390_MODE or OPTION_900_MODE must be specified
#endif
/*-------------------------------------------------------------------*/
#if defined( OPTION_370_MODE )
#define _370 // (define if arch gen'ed)
#define ARCH_370_IDX 0 // (array index for arch)
#define _ARCH_NUM_0 370 // (the arch to be gen'ed)
#endif
#if defined( OPTION_390_MODE )
#define _390
#if !defined( _ARCH_NUM_0 )
#define ARCH_390_IDX 0
#define _ARCH_NUM_0 390
#else
#define ARCH_390_IDX 1
#define _ARCH_NUM_1 390
#endif
#endif
#if defined( OPTION_900_MODE )
#define _900
#if !defined( _ARCH_NUM_1 )
#define ARCH_900_IDX 1
#define _ARCH_NUM_1 900
#else
#define ARCH_900_IDX 2
#define _ARCH_NUM_2 900
#endif
#endif
/*-------------------------------------------------------------------*/
#if defined( _900 ) && !defined( _390 )
#error OPTION_900_MODE requires OPTION_390_MODE to be #defined too
#endif
/*-------------------------------------------------------------------*/
#if !defined( ARCH_370_IDX )
#define ARCH_370_IDX -1
#endif
#if !defined( ARCH_390_IDX )
#define ARCH_390_IDX -1
#endif
#if !defined( ARCH_900_IDX )
#define ARCH_900_IDX -1
#endif
/*-------------------------------------------------------------------*/
/* The "NUM_GEN_ARCHS" value is used as an array size for any table */
/* which needs a slot for each gen'ed architecture. Use either the */
/* "ARCH_nnn_IDX" constant or the 'sysblk.arch_mode' value to index */
/* into the table to reach the desired entry. */
/*-------------------------------------------------------------------*/
#if defined( _ARCH_NUM_2 )
#define NUM_GEN_ARCHS 3
#elif defined( _ARCH_NUM_1 )
#define NUM_GEN_ARCHS 2
#else
#define NUM_GEN_ARCHS 1
#endif
//--------------------------------------------------------------------
// PROGRAMMING NOTE
//--------------------------------------------------------------------
//
// We need an extra 2 slots in each opcode table entry to allow for
// the 2 extra pointers needed by the instruction printing functions.
//
// Notice the ROUTE_IPRINT macro in opcode.c accessing these 2 extra
// pointers in the opcode table entry:
//
// iprt_func = gen_opcode_{tabname} [...] [ NUM_INSTR_TAB_PTRS - 2 ];
// mnemonic = gen_opcode_{tabname} [...] [ NUM_INSTR_TAB_PTRS - 1 ];
// return iprt_func( inst, mnemonic, prtbuf );
//
// and how the IPRINT_ROUT2 macro defines its routing function:
//
// int iprint_{asmfmt}( BYTE inst[], char mnemonic[], char* prtbuf );
//
// Finally also notice the definition of the "GENx370x390x900" macro
// in opcode.h, which defines opcode table entries for each opcode:
// it defines not only a pointer to the intruction function for each
// architecture, but also defines those 2 extra pointers as the last
// two entries for each opcode table entry:
//
// #define GENx370x___x900( ... )
//
// _GEN370( _ifunc_name )
// _GEN390( _ifunc_name )
// _GEN900( _ifunc_name )
//
// (void*) &iprint_ ## _asmfmt,
// (void*) & _mnemonic "\0" #_ifunc_name
//
// Thus we need "+2" in the below #define for "NUM_INSTR_TAB_PTRS"
// so the opcode tables in opcode.c defined by the "GENx370x390x900"
// macro have room for the 2 extra pointers used by the IPRINT_ROUT2
// instruction printing functions called during instruction tracing.
//
//--------------------------------------------------------------------
#define NUM_INSTR_TAB_PTRS NUM_GEN_ARCHS + 2 // (see NOTE above)
/*-------------------------------------------------------------------*/
#else // (featchk pass 2: check sanity of #defined features)
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
/* PASS 2: check FEATURE sanity */
/*-------------------------------------------------------------------*/
/* In this section of code you should sanity-check your FEATURE */
/* combinations. That is, if one of your features requires that */
/* some other feature also be defined, then you would check that */
/* combination here and issue an #error message if it wasn't true. */
/* IDEALLY, you should not be doing any #defines here. You should */
/* only be doing #if and #error. All of the #defines should have */
/* ideally already been done in the previous section above during */
/* the first pass of this header. This is to prevent any type of */
/* dependency on the order/sequence of checking. *NONE* of the */
/* below sanity checks should depend on any prior/previous check. */
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
/* Facility-bit FEATUREs */
/*-------------------------------------------------------------------*/
#if defined( FEATURE_001_ZARCH_INSTALLED_FACILITY ) && defined( FEATURE_SIE ) \
&& !defined( _FEATURE_SIE )
#error z/Arch SIE requires ESA/390 SIE too
#endif
#if defined( FEATURE_001_ZARCH_INSTALLED_FACILITY ) && defined( _FEATURE_SIE ) \
&& !defined( FEATURE_STORAGE_KEY_ASSIST )
#error SIE requires storage key assist
#endif
#if defined( FEATURE_001_ZARCH_INSTALLED_FACILITY ) && !defined( FEATURE_000_N3_INSTR_FACILITY )
#error z/Architecture requires the 'N3' instruction set (new to z/Arch and added to ESA/390)
#endif
#if defined( FEATURE_001_ZARCH_INSTALLED_FACILITY ) && !defined( FEATURE_NEW_ZARCH_ONLY_INSTRUCTIONS )
#error z/Architecture requires the 'N' instruction set (new to z/Architecture only)
#endif
#if defined( FEATURE_004_IDTE_SC_SEGTAB_FACILITY ) \
&& !defined( FEATURE_003_DAT_ENHANCE_FACILITY_1 )
#error FEATURE_004_IDTE_SC_SEGTAB_FACILITY requires FEATURE_003_DAT_ENHANCE_FACILITY_1
#endif
#if defined( FEATURE_005_IDTE_SC_REGTAB_FACILITY ) \
&& (!defined( FEATURE_004_IDTE_SC_SEGTAB_FACILITY ) || !defined( FEATURE_003_DAT_ENHANCE_FACILITY_1 ))
#error FEATURE_005_IDTE_SC_REGTAB_FACILITY requires both FEATURE_004_IDTE_SC_SEGTAB_FACILITY and FEATURE_003_DAT_ENHANCE_FACILITY_1
#endif
#if defined( FEATURE_006_ASN_LX_REUSE_FACILITY ) && !defined( FEATURE_001_ZARCH_INSTALLED_FACILITY )
#error ASN-and-LX-Reuse facility is only supported with z/Arch
#endif
#if defined( FEATURE_006_ASN_LX_REUSE_FACILITY ) && !defined( FEATURE_DUAL_ADDRESS_SPACE )
#error ASN-and-LX-Reuse facility requires Dual Address-Space feature
#endif
#if defined( FEATURE_007_STFL_EXTENDED_FACILITY ) && !defined( FEATURE_000_N3_INSTR_FACILITY )
#error Store Facility List Extended Facility implies STFL (N3 instruction set)
#endif
#if defined( FEATURE_019_LONG_DISPL_HPERF_FACILITY ) && !defined( FEATURE_018_LONG_DISPL_INST_FACILITY )
#error FEATURE_019_LONG_DISPL_HPERF_FACILITY requires FEATURE_018_LONG_DISPL_INST_FACILITY
#endif
#if defined( FEATURE_020_HFP_MULT_ADD_SUB_FACILITY ) && !defined( FEATURE_HEXADECIMAL_FLOATING_POINT )
#error HFP multiply add/subtract facility requires Hexadecimal floating point support
#endif
#if defined( FEATURE_023_HFP_UNNORM_EXT_FACILITY ) && !defined( FEATURE_HEXADECIMAL_FLOATING_POINT )
#error HFP unnormalized extensions facility requires Hexadecimal floating point support
#endif
#if defined( FEATURE_033_CSS_FACILITY_2 ) && !defined( FEATURE_032_CSS_FACILITY )
#error FEATURE_033_CSS_FACILITY_2 requires FEATURE_032_CSS_FACILITY
#endif
#if defined( FEATURE_037_FP_EXTENSION_FACILITY ) && !defined( FEATURE_BINARY_FLOATING_POINT )
#error Floating point extensions facility requires Binary floating point support
#endif
#if defined( FEATURE_037_FP_EXTENSION_FACILITY ) && !defined( FEATURE_042_DFP_FACILITY )
#error Floating point extensions facility requires Decimal floating point facility
#endif
#if (defined( FEATURE_041_FPS_ENHANCEMENT_FACILITY ) || \
defined( FEATURE_041_DFP_ROUNDING_FACILITY ) || \
defined( FEATURE_041_FPR_GR_TRANSFER_FACILITY ) || \
defined( FEATURE_041_FPS_SIGN_HANDLING_FACILITY ) || \
defined( FEATURE_041_IEEE_EXCEPT_SIM_FACILITY )) \
&& ( \
!defined( FEATURE_041_FPS_ENHANCEMENT_FACILITY ) || \
!defined( FEATURE_041_DFP_ROUNDING_FACILITY ) || \
!defined( FEATURE_041_FPR_GR_TRANSFER_FACILITY ) || \
!defined( FEATURE_041_FPS_SIGN_HANDLING_FACILITY ) || \
!defined( FEATURE_041_IEEE_EXCEPT_SIM_FACILITY ))
#error ALL "FEATURE_041..." features must either be ALL defined or ALL not defined
#endif
#if defined( FEATURE_042_DFP_FACILITY ) && !defined( FEATURE_BASIC_FP_EXTENSIONS )
#error Decimal floating point facility requires Basic FP extensions
#endif
#if defined( FEATURE_043_DFP_HPERF_FACILITY ) && !defined( FEATURE_042_DFP_FACILITY )
#error DFP has high performance requires Decimal floating point facility
#endif
#if (defined( FEATURE_045_DISTINCT_OPERANDS_FACILITY ) || \
defined( FEATURE_045_FAST_BCR_SERIAL_FACILITY ) || \
defined( FEATURE_045_HIGH_WORD_FACILITY ) || \
defined( FEATURE_045_INTERLOCKED_ACCESS_FACILITY_1 ) || \
defined( FEATURE_045_LOAD_STORE_ON_COND_FACILITY_1 ) || \
defined( FEATURE_045_POPULATION_COUNT_FACILITY )) \
&& ( \
!defined( FEATURE_045_DISTINCT_OPERANDS_FACILITY ) || \
!defined( FEATURE_045_FAST_BCR_SERIAL_FACILITY ) || \
!defined( FEATURE_045_HIGH_WORD_FACILITY ) || \
!defined( FEATURE_045_INTERLOCKED_ACCESS_FACILITY_1 ) || \
!defined( FEATURE_045_LOAD_STORE_ON_COND_FACILITY_1 ) || \
!defined( FEATURE_045_POPULATION_COUNT_FACILITY ))
#error ALL "FEATURE_045..." features must either be ALL defined or ALL not defined
#endif
#if defined( FEATURE_048_DFP_ZONE_CONV_FACILITY ) && !defined( FEATURE_042_DFP_FACILITY )
#error Decimal-floating-point Zoned-conversion facility requires Decimal floating point facility
#endif
#if (defined( FEATURE_049_EXECUTION_HINT_FACILITY ) || \
defined( FEATURE_049_LOAD_AND_TRAP_FACILITY ) || \
defined( FEATURE_049_PROCESSOR_ASSIST_FACILITY ) || \
defined( FEATURE_049_MISC_INSTR_EXT_FACILITY_1 )) \
&& ( \
!defined( FEATURE_049_EXECUTION_HINT_FACILITY ) || \
!defined( FEATURE_049_LOAD_AND_TRAP_FACILITY ) || \
!defined( FEATURE_049_PROCESSOR_ASSIST_FACILITY ) || \
!defined( FEATURE_049_MISC_INSTR_EXT_FACILITY_1 ))
#error ALL "FEATURE_049..." features must either be ALL defined or ALL not defined
#endif
#if defined( FEATURE_050_CONSTR_TRANSACT_FACILITY ) && !defined( FEATURE_073_TRANSACT_EXEC_FACILITY )
#error Constrained-transactional-execution facility requires Transactional-execution facility
#endif
#if (defined( FEATURE_053_LOAD_STORE_ON_COND_FACILITY_2 ) || \
defined( FEATURE_053_LOAD_ZERO_RIGHTMOST_FACILITY )) \
&& ( \
!defined( FEATURE_053_LOAD_STORE_ON_COND_FACILITY_2 ) || \
!defined( FEATURE_053_LOAD_ZERO_RIGHTMOST_FACILITY ))
#error ALL "FEATURE_053..." features must either be ALL defined or ALL not defined
#endif
#if defined( FEATURE_061_MISC_INSTR_EXT_FACILITY_3 ) && !defined( FEATURE_045_POPULATION_COUNT_FACILITY )
#error Miscellaneous-Instruction-Extensions Facility 3 requires Population-Count facility
#endif
#if defined( FEATURE_068_CPU_MEAS_SAMPLNG_FACILITY ) && !defined( FEATURE_040_LOAD_PROG_PARAM_FACILITY )
#error CPU Measurement Sampling facility requires Load Program Parameter facility
#endif
#if defined( FEATURE_068_CPU_MEAS_SAMPLNG_FACILITY ) && !defined( FEATURE_067_CPU_MEAS_COUNTER_FACILITY )
#error CPU Measurement Sampling facility requires CPU Measurement Counter facility
#endif
#if defined( FEATURE_073_TRANSACT_EXEC_FACILITY ) && !defined( FEATURE_049_PROCESSOR_ASSIST_FACILITY )
#error Transactional-execution facility requires Processor-assist facility
#endif
#if defined( FEATURE_075_ACC_EX_FS_INDIC_FACILITY ) && !defined( FEATURE_ENHANCED_SUPPRESSION_ON_PROTECTION )
#error Access-Exception Fetch/Store Indication facility requires Enhanced Suppression on Protection feature
#endif
#if defined( FEATURE_076_MSA_EXTENSION_FACILITY_3 ) && !defined( FEATURE_MSA_EXTENSION_FACILITY_2 )
#error You cannot have "Message Security Assist extension 3" without having "Message Security Assist extension 2"
#endif
#if defined( FEATURE_077_MSA_EXTENSION_FACILITY_4 ) && !defined( FEATURE_076_MSA_EXTENSION_FACILITY_3 )
#error You cannot have "Message Security Assist extension 4" without having "Message Security Assist extension 3"
#endif
#if defined( FEATURE_078_ENHANCED_DAT_FACILITY_2 ) && !defined( FEATURE_008_ENHANCED_DAT_FACILITY_1 )
#error FEATURE_078_ENHANCED_DAT_FACILITY_2 requires FEATURE_008_ENHANCED_DAT_FACILITY_1
#endif
#if defined( FEATURE_080_DFP_PACK_CONV_FACILITY ) && !defined( FEATURE_042_DFP_FACILITY )
#error Decimal-floating-point Packed-conversion facility requires Decimal floating point facility
#endif
#if defined( FEATURE_081_PPA_IN_ORDER_FACILITY ) && !defined( FEATURE_049_PROCESSOR_ASSIST_FACILITY )
#error FEATURE_081_PPA_IN_ORDER_FACILITY requires FEATURE_049_PROCESSOR_ASSIST_FACILITY
#endif
#if defined( FEATURE_129_ZVECTOR_FACILITY ) && !defined( FEATURE_001_ZARCH_INSTALLED_FACILITY )
#error z/Arch Vector facility only valid for z/Arch mode
#endif