forked from SDL-Hercules-390/hyperion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopcode.h
More file actions
3825 lines (3352 loc) · 159 KB
/
opcode.h
File metadata and controls
3825 lines (3352 loc) · 159 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* OPCODE.H (C) Copyright Jan Jaeger, 2000-2012 */
/* (C) and others 2013-2021 */
/* Instruction decoding macros and prototypes */
/* */
/* Released under "The Q Public License Version 1" */
/* (http://www.hercules-390.org/herclic.html) as modifications to */
/* Hercules. */
/* Interpretive Execution - (C) Copyright Jan Jaeger, 1999-2012 */
/* z/Architecture support - (C) Copyright Jan Jaeger, 1999-2012 */
#ifndef _OPCODE_H
#define _OPCODE_H
#include "hercules.h"
/*-------------------------------------------------------------------*/
/* Architecture INDEPENDENT macros */
/*-------------------------------------------------------------------*/
/* The following macros are defined ONE TIME */
/* and thus are the same for all build architectures. */
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
/* helper macros to define an opcode table instruction function name */
/*-------------------------------------------------------------------*/
#if defined( _370 )
#define _GEN370( _ifunc_name ) &s370_ ## _ifunc_name,
#else
#define _GEN370( _ifunc_name )
#endif
#if defined( _390 )
#define _GEN390( _ifunc_name ) &s390_ ## _ifunc_name,
#else
#define _GEN390( _ifunc_name )
#endif
#if defined( _900 )
#define _GEN900( _ifunc_name ) &z900_ ## _ifunc_name,
#else
#define _GEN900( _ifunc_name )
#endif
/*-------------------------------------------------------------------*/
/* Macros for defining opcode table entries */
/*-------------------------------------------------------------------*/
/* */
/* PROGRAMMING NOTE: the '_ifmt' argument in the below "GENx" macros */
/* is currently ignored since it is not being used for anything at */
/* the moment. At some point in the near future however, if things */
/* work out, it will actually be used as a function call to decode */
/* the instruction before being dispatched to the actual function */
/* that executes the instruction, relieving each instruction from */
/* having to decode the instruction itself each time (as well as */
/* relieving the instruction 'iprint' (tracing) functions from also */
/* having to decode the instruction too!) After all, if there are */
/* 57 instructions defined that use the 'RR' format and 220 defined */
/* that use the 'RRE' format, etc, why should they each have to do */
/* the same thing themselves each time? There needs to be a common */
/* instruction format decoding function that is called before each */
/* instruction function is ever reached so that all the instruction */
/* itself has to do is whatever its purpose is. After all, decoding */
/* an instruction is LOGICALLY part of the instruction decoding and */
/* dispatching logic, NOT something that each instruction (or each */
/* 'iprint' tracing function!) should be doing themselves. This is */
/* what I intend to (hope to) fix at some point in the near future. */
/* */
/*-------------------------------------------------------------------*/
#define GENx___x___x___ \
{ \
_GEN370( operation_exception ) \
_GEN390( operation_exception ) \
_GEN900( operation_exception ) \
(void*) &iprint_ASMFMT_none, \
(void*) &"?????" "\0" "?" \
}
#define GENx370x___x___( _mnemonic, _ifmt, _asmfmt, _ifunc_name ) \
{ \
_GEN370( _ifunc_name ) \
_GEN390( operation_exception ) \
_GEN900( operation_exception ) \
(void*) &iprint_ ## _asmfmt, \
(void*) & _mnemonic "\0" #_ifunc_name \
}
#define GENx___x390x___( _mnemonic, _ifmt, _asmfmt, _ifunc_name ) \
{ \
_GEN370( operation_exception ) \
_GEN390( _ifunc_name ) \
_GEN900( operation_exception ) \
(void*) &iprint_ ## _asmfmt, \
(void*) & _mnemonic "\0" #_ifunc_name \
}
#define GENx370x390x___( _mnemonic, _ifmt, _asmfmt, _ifunc_name ) \
{ \
_GEN370( _ifunc_name ) \
_GEN390( _ifunc_name ) \
_GEN900( operation_exception ) \
(void*) &iprint_ ## _asmfmt, \
(void*) & _mnemonic "\0" #_ifunc_name \
}
#define GENx___x___x900( _mnemonic, _ifmt, _asmfmt, _ifunc_name ) \
{ \
_GEN370( operation_exception ) \
_GEN390( operation_exception ) \
_GEN900( _ifunc_name ) \
(void*) &iprint_ ## _asmfmt, \
(void*) & _mnemonic "\0" #_ifunc_name \
}
#define GENx370x___x900( _mnemonic, _ifmt, _asmfmt, _ifunc_name ) \
{ \
_GEN370( _ifunc_name ) \
_GEN390( operation_exception ) \
_GEN900( _ifunc_name ) \
(void*) &iprint_ ## _asmfmt, \
(void*) & _mnemonic "\0" #_ifunc_name \
}
#define GENx___x390x900( _mnemonic, _ifmt, _asmfmt, _ifunc_name ) \
{ \
_GEN370( operation_exception ) \
_GEN390( _ifunc_name ) \
_GEN900( _ifunc_name ) \
(void*) &iprint_ ## _asmfmt, \
(void*) & _mnemonic "\0" #_ifunc_name \
}
#define GENx370x390x900( _mnemonic, _ifmt, _asmfmt, _ifunc_name ) \
{ \
_GEN370( _ifunc_name ) \
_GEN390( _ifunc_name ) \
_GEN900( _ifunc_name ) \
(void*) &iprint_ ## _asmfmt, \
(void*) & _mnemonic "\0" #_ifunc_name \
}
/*-------------------------------------------------------------------*/
/* PROGRAMMING NOTE */
/*-------------------------------------------------------------------*/
/* The following set of macros identifies those instructions which */
/* are a part of the FEATURE_370_EXTENSION backport of some S/390 */
/* and z/Architecture instructions to System/370 mode (refer to the */
/* the feat370.h header). All instructions so identified will have */
/* their instruction generated also for the S/370 architecture mode */
/* as well, even though such instruction are not formally a part of */
/* the System/370 architecture. */
/* */
/* Whether or not such instructions cause a Program Check Operation */
/* Exception to occur when executed in S/370 mode is controlled via */
/* enabling or disabling the 'HERC_370_EXTENSION' archlvl facility. */
/* */
/* When the facility is disabled (default), all such instructions */
/* will properly Program Check (Operation Exception) when attempted */
/* to be executed in S/370 mode. When the facility enabled however, */
/* then all such 37X instructions are instead allowed to execute. */
/*-------------------------------------------------------------------*/
#define GENx37Xx390x___ GENx370x390x___
#define GENx37Xx___x900 GENx370x___x900
#define GENx37Xx390x900 GENx370x390x900
/*-------------------------------------------------------------------*/
#define ILC(_b) ((_b) < 0x40 ? 2 : (_b) < 0xc0 ? 4 : 6)
#define REAL_ILC(_regs) \
(likely(!(_regs)->execflag) ? (_regs)->psw.ilc : (_regs)->exrl ? 6 : 4)
#define ILC_FROM_PIID( piid ) (((piid) & 0x00070000) >> 16)
#define CODE_FROM_PIID( piid ) (((piid) & 0x0000FFFF) )
/*-------------------------------------------------------------------*/
/* Instruction tracing helper function to print the instruction */
/*-------------------------------------------------------------------*/
#define PRINT_INST( _inst, _prtbuf ) \
\
iprint_router_func( (_inst), 0, (_prtbuf) )
extern int iprint_router_func( BYTE inst[], char mnemonic[], char* prtbuf );
/*-------------------------------------------------------------------*/
/* Individual instruction counting */
/*-------------------------------------------------------------------*/
#if defined( OPTION_INSTRUCTION_COUNTING )
#define ICOUNT_INST( _inst, _regs ) \
do \
{ \
if (sysblk.icount) \
{ \
int used; \
switch ((_inst)[0]) { \
case 0x01: \
used = sysblk.imap01[(_inst)[1]]++; \
break; \
case 0xA4: \
used = sysblk.imapa4[(_inst)[1]]++; \
break; \
case 0xA5: \
used = sysblk.imapa5[(_inst)[1] & 0x0F]++; \
break; \
case 0xA6: \
used = sysblk.imapa6[(_inst)[1]]++; \
break; \
case 0xA7: \
used = sysblk.imapa7[(_inst)[1] & 0x0F]++; \
break; \
case 0xB2: \
used = sysblk.imapb2[(_inst)[1]]++; \
break; \
case 0xB3: \
used = sysblk.imapb3[(_inst)[1]]++; \
break; \
case 0xB9: \
used = sysblk.imapb9[(_inst)[1]]++; \
break; \
case 0xC0: \
used = sysblk.imapc0[(_inst)[1] & 0x0F]++; \
break; \
case 0xC2: \
used = sysblk.imapc2[(_inst)[1] & 0x0F]++; \
break; \
case 0xC4: \
used = sysblk.imapc4[(_inst)[1] & 0x0F]++; \
break; \
case 0xC6: \
used = sysblk.imapc6[(_inst)[1] & 0x0F]++; \
break; \
case 0xC8: \
used = sysblk.imapc8[(_inst)[1] & 0x0F]++; \
break; \
case 0xE3: \
used = sysblk.imape3[(_inst)[5]]++; \
break; \
case 0xE4: \
used = sysblk.imape4[(_inst)[1]]++; \
break; \
case 0xE5: \
used = sysblk.imape5[(_inst)[1]]++; \
break; \
case 0xEB: \
used = sysblk.imapeb[(_inst)[5]]++; \
break; \
case 0xEC: \
used = sysblk.imapec[(_inst)[5]]++; \
break; \
case 0xED: \
used = sysblk.imaped[(_inst)[5]]++; \
break; \
default: \
used = sysblk.imapxx[(_inst)[0]]++; \
} \
\
if (!used) \
{ \
/* "%s" */ \
WRMSG( HHC02292, "I", "First use" ); \
ARCH_DEP( display_inst )( (_regs), (_inst) ); \
} \
} \
} while (0)
#else // !defined( OPTION_INSTRUCTION_COUNTING )
#define ICOUNT_INST(_inst, _regs)
#endif // defined( OPTION_INSTRUCTION_COUNTING )
/*-------------------------------------------------------------------*/
/* SIE macros */
/* (architecture INDEPENDENT) */
/*-------------------------------------------------------------------*/
#if defined( _FEATURE_SIE )
#define SIE_MODE( _regs ) ((_regs)->sie_mode)
#define SIE_STATE( _regs ) ((_regs)->sie_state)
#define SIE_FEAT_BIT_ON( _regs, _byte, _bit ) ((_regs)->siebk->SIE_ ## _byte & SIE_ ## _byte ## _ ## _bit)
#define SIE_EC_BIT_ON( _regs, _byte, _bit ) ((_regs)->siebk->SIE_ ## _byte & SIE_ ## _byte ## _ ## _bit)
#define SIE_FEAT_BIT_OFF( _regs, _byte, _bit ) !SIE_FEAT_BIT_ON( _regs, _byte, _bit )
#define SIE_EC_BIT_OFF( _regs, _byte, _bit ) !SIE_EC_BIT_ON( _regs, _byte, _bit )
#define SIE_STATE_BIT_ON( _regs, _byte, _bit ) (SIE_MODE((_regs)) && SIE_FEAT_BIT_ON( (_regs), _byte, _bit ))
#define SIE_STATE_BIT_OFF( _regs, _byte, _bit ) (SIE_MODE((_regs)) && SIE_FEAT_BIT_OFF( (_regs), _byte, _bit ))
#define TXF_SIE_INTERCEPT( _regs, _name ) \
do \
{ \
/* Only allow direct execution of TXF instructions \
if the z/VM host says to allow it. Otherwise let \
the z/VM host intercept this instruction so it \
can simulate it, throw a PIC001, or at least be \
informed that we are executing this instruction. \
*/ \
if (1 \
&& SIE_MODE( (_regs) ) \
&& SIE_EC_BIT_OFF( (_regs), ECB0, TXF ) \
) \
{ \
if (TXF_TRACING()) \
{ \
/* "TXF: %s%02X: SIE: Intercepting \
%s instruction" */ \
WRMSG( HHC17715, "D", \
TXF_CPUAD( _regs ), #_name ); \
} \
longjmp( (_regs)->progjmp, SIE_INTERCEPT_INST ); \
} \
} \
while (0)
#else // !defined( _FEATURE_SIE )
#define SIE_MODE( _regs ) (0)
#define SIE_STATE( _regs ) (0)
#define SIE_FEAT_BIT_ON( _regs, _byte, _bit ) (0)
#define SIE_EC_BIT_ON( _regs, _byte, _bit ) (0)
#define SIE_STATE_BIT_ON( _regs, _byte, _bit ) (0)
#define SIE_FEAT_BIT_OFF( _regs, _byte, _bit ) (1)
#define SIE_EC_BIT_OFF( _regs, _byte, _bit ) (1)
#define SIE_STATE_BIT_OFF( _regs, _byte, _bit ) (1)
#define TXF_SIE_INTERCEPT( _regs, _name ) /* (do nothing) */
#endif // defined( _FEATURE_SIE )
#if defined( _FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE )
#undef MULTIPLE_CONTROLLED_DATA_SPACE
#define MULTIPLE_CONTROLLED_DATA_SPACE( _regs ) \
(SIE_FEAT_BIT_ON( (_regs), MX, XC ) && AR_BIT( &(_regs)->psw ))
#else
#undef MULTIPLE_CONTROLLED_DATA_SPACE
#define MULTIPLE_CONTROLLED_DATA_SPACE( _regs ) (0)
#endif
#if defined( FEATURE_SIE )
#undef SIE_ACTIVE
#define SIE_ACTIVE( _regs ) ((_regs)->sie_active)
#else
#undef SIE_ACTIVE
#define SIE_ACTIVE( _regs ) (0)
#endif
/*-------------------------------------------------------------------*/
/* Instruction "FOOTPRINT" */
/*-------------------------------------------------------------------*/
/* The footprint_buffer option saves a copy of the register context */
/* every time an instruction is executed. This is for problem */
/* determination only, as it SEVERELY impacts performance. *JJ */
/*-------------------------------------------------------------------*/
#if defined( OPTION_FOOTPRINT_BUFFER )
#define FOOTPRINT(_ip, _regs) \
do { \
sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]] = *(_regs); \
memcpy(&sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]++].inst,(_ip),6); \
sysblk.footprptr[(_regs)->cpuad] &= OPTION_FOOTPRINT_BUFFER - 1; \
} while(0)
#endif
#if !defined( FOOTPRINT )
#define FOOTPRINT(_ip, _regs)
#endif
/*-------------------------------------------------------------------*/
/* CPU Stepping or Tracing */
/*-------------------------------------------------------------------*/
#define TXF_INSTR_TRACING() \
(sysblk.txf_tracing & TXF_TR_INSTR)
#define TXF_CONSTRAINED_TRANS_INSTR( _regs ) \
((sysblk.txf_tracing & TXF_TR_C) \
&& (_regs)->txf_tnd && (_regs)->txf_contran)
#define TXF_UNCONSTRAINED_TRANS_INSTR( _regs ) \
((sysblk.txf_tracing & TXF_TR_U) \
&& (_regs)->txf_tnd && !(_regs)->txf_contran)
#define TXF_TRACE_THIS_INSTR( _regs ) \
(1 \
&& TXF_TRACE_CPU( _regs ) \
&& TXF_TRACE_TND( _regs ) \
&& (0 \
|| TXF_CONSTRAINED_TRANS_INSTR( _regs ) \
|| TXF_UNCONSTRAINED_TRANS_INSTR( _regs ) \
) \
)
#define _CPU_STEP_OR_TRACE(_steptrace, _regs, _ilc) \
(0 \
|| !TXF_INSTR_TRACING() \
|| TXF_TRACE_THIS_INSTR( _regs ) \
) \
&& \
( \
(sysblk._steptrace[0] == 0 && sysblk._steptrace[1] == 0) \
|| (sysblk._steptrace[0] <= sysblk._steptrace[1] \
&& PSW_IA_FROM_IP((_regs), -(_ilc)) >= sysblk._steptrace[0] \
&& PSW_IA_FROM_IP((_regs), -(_ilc)) <= sysblk._steptrace[1] \
) \
|| (sysblk._steptrace[0] > sysblk._steptrace[1] \
&& PSW_IA_FROM_IP((_regs), -(_ilc)) >= sysblk._steptrace[1] \
&& PSW_IA_FROM_IP((_regs), -(_ilc)) <= sysblk._steptrace[0] \
) \
) \
#define CPU_STEPPING(_regs, _ilc) \
(sysblk.instbreak && _CPU_STEP_OR_TRACE(breakaddr,(_regs),(_ilc)))
#define CPU_TRACING(_regs, _ilc) \
(sysblk.insttrace && _CPU_STEP_OR_TRACE(traceaddr,(_regs),(_ilc)))
#define CPU_STEPPING_OR_TRACING(_regs, _ilc) \
( unlikely((_regs)->breakortrace) && \
(CPU_STEPPING((_regs), (_ilc)) || CPU_TRACING((_regs), (_ilc))) \
)
#define _CPU_TRACESTEP_ALL(_steptrace,_addr) \
(sysblk._steptrace && sysblk._addr[0] == 0 && sysblk._addr[1] == 0)
#define CPU_TRACING_ALL _CPU_TRACESTEP_ALL( insttrace, traceaddr )
#define CPU_STEPPING_ALL _CPU_TRACESTEP_ALL( instbreak, breakaddr )
#define CPU_STEPPING_OR_TRACING_ALL (CPU_TRACING_ALL || CPU_STEPPING_ALL)
#define PROCESS_TRACE( _regs, _ip, _goto ) \
do \
{ \
/* If stepping or tracing, trace this instruction */ \
if ((_regs)->breakortrace) \
{ \
ARCH_DEP( process_trace )( (_regs), (_ip) ); \
\
/* If the aie was invalidated, re-fetch the instruction. \
Another CPU executing e.g. a IPTE instruction during \
instruction stepping while process_trace was waiting \
for the user to press the enter key can allow this to \
occur. Otherwise it is impossible to occur. */ \
if (1 \
&& (_regs)->stepping \
&& !VALID_AIE( _regs ) \
) \
{ \
/* "Processor %s%02X: aie invalidated; instruction refetched" */ \
WRMSG( HHC00835, "W", PTYPSTR( (_regs)->cpuad ), (_regs)->cpuad ); \
goto _goto; \
} \
} \
} \
while (0)
/*-------------------------------------------------------------------*/
/* Simple helper macro that instructions can use */
/* to force an immediate check for interrupts. */
/*-------------------------------------------------------------------*/
#define RETURN_INTCHECK(_regs) \
longjmp((_regs)->progjmp, SIE_NO_INTERCEPT)
/*-------------------------------------------------------------------*/
/* Instruction validity checking */
/*-------------------------------------------------------------------*/
#define ODD_CHECK(_r, _regs) \
if( (_r) & 1 ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
#define ODD2_CHECK(_r1, _r2, _regs) \
if( ((_r1) & 1) || ((_r2) & 1) ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
#define HW_CHECK(_value, _regs) \
if( (_value) & 1 ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
#define FW_CHECK(_value, _regs) \
if( (_value) & 3 ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
#define DW_CHECK(_value, _regs) \
if( (_value) & 7 ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
#define QW_CHECK(_value, _regs) \
if( (_value) & 15 ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
/* Program check if m is not 0, 1, or 4 to 7 */
#define HFPM_CHECK(_m, _regs) \
if (((_m) == 2) || ((_m) == 3) || ((_m) & 8)) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
#define PRIV_CHECK(_regs) \
if( PROBSTATE(&(_regs)->psw) ) \
(_regs)->program_interrupt( (_regs), PGM_PRIVILEGED_OPERATION_EXCEPTION)
/* Program check if r is not 0,1,4,5,8,9,12, or 13 (designating
the lower-numbered register of a floating-point register pair) */
#define BFPREGPAIR_CHECK(_r, _regs) \
if( ((_r) & 2) ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
/* Program check if r1 and r2 are not both 0,1,4,5,8,9,12, or 13
(lower-numbered register of a floating-point register pair) */
#define BFPREGPAIR2_CHECK(_r1, _r2, _regs) \
if( ((_r1) & 2) || ((_r2) & 2) ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
/* Program check if r is not 0,1,4,5,8,9,12, or 13 (designating
the lower-numbered register of a floating-point register pair) */
#define DFPREGPAIR_CHECK(_r, _regs) \
if( ((_r) & 2) ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
/* Program check if r1 and r2 are not both 0,1,4,5,8,9,12, or 13
(lower-numbered register of a floating-point register pair) */
#define DFPREGPAIR2_CHECK(_r1, _r2, _regs) \
if( ((_r1) & 2) || ((_r2) & 2) ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
/* Program check if r1, r2, r3 are not all 0,1,4,5,8,9,12, or 13
(lower-numbered register of a floating-point register pair) */
#define DFPREGPAIR3_CHECK(_r1, _r2, _r3, _regs) \
if( ((_r1) & 2) || ((_r2) & 2) || ((_r3) & 2) ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
#define SSID_CHECK(_regs) \
if((!((_regs)->GR_LHH(1) & 0x0001)) \
|| (_regs)->GR_LHH(1) > (0x0001|(FEATURE_LCSS_MAX-1))) \
(_regs)->program_interrupt( (_regs), PGM_OPERAND_EXCEPTION)
#if defined( _FEATURE_S370_S390_VECTOR_FACILITY )
#ifndef _VFDEFS
#define _VFDEFS
#define VOP_CHECK( _regs ) if (!((_regs)->CR(0) & CR0_VOP) || !(_regs)->vf->online) \
(_regs)->program_interrupt( (_regs), PGM_VECTOR_OPERATION_EXCEPTION )
#define VR_INUSE( _vr, _regs ) ((_regs)->vf->vsr & (VSR_VIU0 >> ((_vr) >> 1)))
#define VR_CHANGED( _vr, _regs ) ((_regs)->vf->vsr & (VSR_VCH0 >> ((_vr) >> 1)))
#define SET_VR_INUSE( _vr, _regs ) (_regs)->vf->vsr |= (VSR_VIU0 >> ((_vr) >> 1))
#define SET_VR_CHANGED( _vr, _regs ) (_regs)->vf->vsr |= (VSR_VCH0 >> ((_vr) >> 1))
#define RESET_VR_INUSE( _vr, _regs ) (_regs)->vf->vsr &= ~(VSR_VIU0 >> ((_vr) >> 1))
#define RESET_VR_CHANGED( _vr, _regs ) (_regs)->vf->vsr &= ~(VSR_VCH0 >> ((_vr) >> 1))
#define VMR_SET( _section, _regs ) ((_regs)->vf->vmr[(_section) >> 3] & (0x80 >> ((_section) & 7)))
#define MASK_MODE( _regs ) ((_regs)->vf->vsr & VSR_M)
#define VECTOR_COUNT( _regs ) (((_regs)->vf->vsr & VSR_VCT) >> 32)
#define VECTOR_IX( _regs ) (((_regs)->vf->vsr & VSR_VIX) >> 16)
#endif /* _VFDEFS */
#endif /* defined( _FEATURE_S370_S390_VECTOR_FACILITY ) */
/*-------------------------------------------------------------------*/
/* Device IOID / SSID / LCSS macros */
/*-------------------------------------------------------------------*/
#define IOID_TO_SSID( _ioid ) ((_ioid) >> 16)
#define IOID_TO_LCSS( _ioid ) ((_ioid) >> 17)
#define SSID_TO_LCSS( _ssid ) ((_ssid) >> 1 )
#define LCSS_TO_SSID( _lcss ) (((_lcss) << 1 ) | 1)
/*-------------------------------------------------------------------*/
/* Virtual Architecture Level Set Facility */
/*-------------------------------------------------------------------*/
#define FACILITY_ENABLED(_faci, _regs) \
(((_regs)->facility_list [ ((STFL_ ## _faci)/8) ]) & (0x80 >> ((STFL_ ## _faci) % 8)))
#define FACILITY_ENABLED_DEV(_faci) \
((sysblk.facility_list[ sysblk.arch_mode ][ ((STFL_ ## _faci)/8) ]) & (0x80 >> ((STFL_ ## _faci) % 8)))
#define FACILITY_ENABLED_ARCH( _faci, _arch ) \
((sysblk.facility_list[ (_arch) ][ ((STFL_ ## _faci)/8) ]) & (0x80 >> ((STFL_ ## _faci) % 8)))
#define FACILITY_CHECK(_faci, _regs) \
do { \
if(!FACILITY_ENABLED( _faci, _regs ) ) \
(_regs)->program_interrupt( (_regs), PGM_OPERATION_EXCEPTION); \
} while (0)
/*-------------------------------------------------------------------*/
/* PER range checking */
/*-------------------------------------------------------------------*/
#define PER_RANGE_CHECK(_addr, _low, _high) \
( (((_high) & MAXADDRESS) >= ((_low) & MAXADDRESS)) ? \
(((_addr) >= ((_low) & MAXADDRESS)) && (_addr) <= ((_high) & MAXADDRESS)) : \
(((_addr) >= ((_low) & MAXADDRESS)) || (_addr) <= ((_high) & MAXADDRESS)) )
#define PER_RANGE_CHECK2(_addr1, _addr2, _low, _high) \
( (((_high) & MAXADDRESS) >= ((_low) & MAXADDRESS)) ? \
(((_addr1) >= ((_low) & MAXADDRESS)) && (_addr1) <= ((_high) & MAXADDRESS)) || \
(((_addr2) >= ((_low) & MAXADDRESS)) && (_addr2) <= ((_high) & MAXADDRESS)) || \
(((_addr1) <= ((_low) & MAXADDRESS)) && (_addr2) >= ((_high) & MAXADDRESS)) : \
(((_addr2) >= ((_low) & MAXADDRESS)) || (_addr1) <= ((_high) & MAXADDRESS)) )
/*-------------------------------------------------------------------*/
/* Byte swapping macros */
/*-------------------------------------------------------------------*/
/* The "CSWAPxx()" macros CONDITIONALLY swap the endianess of the */
/* given argument depending on the endianess of the current host, */
/* much like the "htonl()" networking API functions. If this build */
/* of Hercules is for running on a big endian host, then CSWAPxx() */
/* will do absolutely nothing since the argument should already be */
/* in big endian format. If this build of Hercules is for running */
/* on a little endian host however, it will perform the byte swap */
/* so that the result is a big endian value (since z/Architecture */
/* is big endian). */
/* */
/* The "SWAPxx()" macros however, UNCONDITIONALLY swap the endianess */
/* of the specified value *regardless* of the endianess Hercules was */
/* built for or the endianess of the host it is running on. It is */
/* designed for situations such as what might exist when a number */
/* is read or written to/from disk in a format different from the */
/* format of the Hercules build or the host it is running on (such */
/* as what occurs with Hercules's emulated dasd files). In such a */
/* situation the device driver detects the endianess of the system */
/* it is running on differs from the endianess that the DASD file */
/* was written in, thereby requiring it to *UNCONDITIONALLY* swap */
/* the value that was read from disk, REGARDLESS of the endianess */
/* of the Hercules build or the host it is currently running on. */
/*-------------------------------------------------------------------*/
#ifdef WORDS_BIGENDIAN
#define CSWAP16(_x) (_x) // (result ALWAYS big endian)
#define CSWAP32(_x) (_x) // (result ALWAYS big endian)
#define CSWAP64(_x) (_x) // (result ALWAYS big endian)
#else
#define CSWAP16(_x) bswap_16(_x) // (result ALWAYS big endian)
#define CSWAP32(_x) bswap_32(_x) // (result ALWAYS big endian)
#define CSWAP64(_x) bswap_64(_x) // (result ALWAYS big endian)
#endif
#define SWAP16(_x) bswap_16(_x) // (result OPPOSITE of input)
#define SWAP32(_x) bswap_32(_x) // (result OPPOSITE of input)
#define SWAP64(_x) bswap_64(_x) // (result OPPOSITE of input)
#define SWAP_OFF_T(o) (sizeof(o) <= 4 ? SWAP32((U32)o) : SWAP64(o))
/*-------------------------------------------------------------------*/
/* Guest storage FETCH/STORE macros */
/*-------------------------------------------------------------------*/
/* The following macros fetch a value from emulated guest storage */
/* into a local work variable or store a local work variable into */
/* emulated guest storage, performing a CONDITIONAL swap in between */
/* (via the "CSWAPxx()" macro) to ensure the value placed into guest */
/* storage is always big endian or that the local work variable is */
/* always in the expected big or little endian format (depending on */
/* which endianess Hercules was built for). */
/*-------------------------------------------------------------------*/
#define FETCH_HW( _val, _stor ) (_val) = fetch_hw( _stor )
#define FETCH_FW( _val, _stor ) (_val) = fetch_fw( _stor )
#define FETCH_F3( _val, _stor ) (_val) = fetch_f3( _stor )
#define FETCH_DW( _val, _stor ) (_val) = fetch_dw( _stor )
#define STORE_HW( _stor, _val ) store_hw( _stor, _val )
#define STORE_FW( _stor, _val ) store_fw( _stor, _val )
#define STORE_F3( _stor, _val ) store_f3( _stor, _val )
#define STORE_DW( _stor, _val ) store_dw( _stor, _val )
/*-------------------------------------------------------------------*/
/* CKD/CCKD header field FETCH/STORE macros */
/*-------------------------------------------------------------------*/
/* The following macros fetch a value from a CCKD dasd header field */
/* into a local work variable or store a local work variable into */
/* a CCKD dasd header field (e.g. CKD_DEVHDR, CCKD_DEVHDR) doing an */
/* UNCONDITIONAL "SWAPxx()" in between to ensure the numeric value */
/* stored into, or fetched from, the CCKD header field is always in */
/* LITTLE endian format, accomplishing the complete opposite of the */
/* above "FETCH_FW/STORE_FW/etc" macros. */
/*-------------------------------------------------------------------*/
#define FETCH_LE_HW( _val, _stor ) (_val) = SWAP16( fetch_hw( _stor ))
#define FETCH_LE_FW( _val, _stor ) (_val) = SWAP32( fetch_fw( _stor ))
#define FETCH_LE_DW( _val, _stor ) (_val) = SWAP64( fetch_dw( _stor ))
#define STORE_LE_HW( _stor, _val ) store_hw( _stor, SWAP16( _val ))
#define STORE_LE_FW( _stor, _val ) store_fw( _stor, SWAP32( _val ))
#define STORE_LE_DW( _stor, _val ) store_dw( _stor, SWAP64( _val ))
#include "machdep.h"
#endif /*!defined( _OPCODE_H )*/
/*-------------------------------------------------------------------*/
/* Architecture DEPENDENT macros */
/*-------------------------------------------------------------------*/
/* The following macros are undef'ed and then re-defined differently */
/* for each subsequent new build architecture. */
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
/* PSW Instruction Address macros */
/*-------------------------------------------------------------------*/
// The _IA_FROM_IP primary helper macro returns a raw virtual PSW
// 'IA' value corresponding to where an offset mainstor 'ip' points,
// i.e. psw.ia <== aiv + ((ip + offset) - aip).
#undef _IA_FROM_IP
#define _IA_FROM_IP( _aiv, _regs, _offset ) \
( \
(_regs)->_aiv \
+ ((uintptr_t)(_regs)->ip - (uintptr_t)(_regs)->aip) \
+ (_offset) \
)
//---------------------------------------------------------------------
// The generic PSW_IA_FROM_IP macro returns a PSW 'IA' as VADR value
// corresponding to where regs 'ip' is pointing plus a passed offset,
// with the resulting PSW 'IA' value masked with ADDRESS_MAXWRAP.
#undef PSW_IA_FROM_IP
#define PSW_IA_FROM_IP( _regs, _offset ) \
\
((VADR)(_IA_FROM_IP( AIV, (_regs), (_offset)) & ADDRESS_MAXWRAP( _regs )))
//---------------------------------------------------------------------
// The next three macros are minor architectural variations of the
// above PSW_IA_FROM_IP macro that return a PSW 'IA' value matching
// where 'ip' plus a passed offset is pointing. The only difference is
// each are specific to the implied architecture, none of them cast
// the result to VADR, and only PSW_IA24 applies an addressing mask.
#undef PSW_IA64
#define PSW_IA64( _regs, _offset ) \
\
(_IA_FROM_IP( AIV_G, (_regs), (_offset)))
#undef PSW_IA31
#define PSW_IA31( _regs, _offset ) \
\
(_IA_FROM_IP( AIV_L, (_regs), (_offset)))
#undef PSW_IA24
#define PSW_IA24( _regs, _offset ) \
\
(_IA_FROM_IP( AIV_L, (_regs), (_offset)) & AMASK24)
//---------------------------------------------------------------------
// The PSEUDO_INVALID_AIE value is used whenever you wish to force
// a break in normal instruction processing and cause the 'instfetch'
// function to be called to perform a full address translation and
// fetch of the next instruction. It is mostly used by instruction
// stepping and tracing logic as well as by the SUCCESS_BRANCH macro
// when the target of the branch is in a different mainstor page.
// The "INVALID_AIE" value is used only by the INVALIDATE_AIA and
// INVALIDATE_AIA_MAIN macros to ALSO to prevent any unwanted PSW
// updating by short circuiting both the MAYBE_SET_PSW_IA_FROM_IP and
// SET_PSW_IA_AND_MAYBE_IP macros. The "PSEUDO_INVALID_AIE" value
// also forces instfetch to be called but additionally allows both
// the MAYBE_SET_PSW_IA_FROM_IP and SET_PSW_IA_AND_MAYBE_IP macros
// to continue behaving normally.
#define INVALID_AIE (NULL)
#define PSEUDO_INVALID_AIE ((BYTE*) 1)
#undef VALID_AIE
#define VALID_AIE( _regs ) ((_regs)->aie != INVALID_AIE)
//---------------------------------------------------------------------
// The MAYBE_SET_PSW_IA_FROM_IP macro (notice the 'MAYBE' and 'SET'
// in its name) CONDITIONALLY sets the virtual psw 'IA' value to point
// to the same corresponding place as where the current mainstor 'ip'
// currently points (with no offset), but does so IF AND ONLY IF the
// 'aie' value is still valid. Otherwise it does absolutely nothing.
#undef MAYBE_SET_PSW_IA_FROM_IP
#define MAYBE_SET_PSW_IA_FROM_IP( _regs ) \
do \
{ \
if (VALID_AIE( _regs )) \
(_regs)->psw.IA = PSW_IA_FROM_IP( (_regs), 0 ); \
} \
while (0)
//---------------------------------------------------------------------
// The SET_PSW_IA_AND_MAYBE_IP macro (notice the 'MAYBE' in its name)
// performs the opposite of the above MAYBE_SET_PSW_IA_FROM_IP macro:
// it sets the mainstor 'ip' to the same corresponding place as where
// the passed virtual psw 'IA' value points. It first UNCONDITIONALLY
// SETS the PSW IA to the passed value and then MAYBE also sets the
// 'ip' to the same corresponding place in mainstor, but it ONLY does
// so IF AND ONLY IF the updated 'ia' value still points within the
// same virtual page. If it doesn't, then the 'aie' value is set to
// NULL to force a full 'instfetch' which then calculates a new 'ip',
// 'aie' and 'aip' value on the next instruction fetch.
#undef SET_PSW_IA_AND_MAYBE_IP
#define SET_PSW_IA_AND_MAYBE_IP( _regs, _ia ) \
do \
{ \
(_regs)->psw.IA = (_ia) & ADDRESS_MAXWRAP( _regs ); \
\
if (VALID_AIE( _regs )) \
{ \
if ((_regs)->AIV == ((_regs)->psw.IA & (PAGEFRAME_PAGEMASK|1))) \
(_regs)->ip = _PSW_IA_MAIN( (_regs), (_regs)->psw.IA ); \
else \
(_regs)->aie = INVALID_AIE; \
} \
} \
while (0)
//---------------------------------------------------------------------
// The INST_UPDATE_PSW macro sets the psw ILC to the passed value and
// bumps the regs->ip instruction pointer by the passed _len value,
// BUT ONLY IF the passed value is non-zero.
//
// It is typically used by the instruction decoder macros to set the
// ilc for the instruction just decoded and to then bump the 'ip' to
// the next sequential instruction.
//
// Normally '_len' and '_ilc' are the same value (being the length
// of the instruction being decoded). The reason they are passed as
// separate values however is to allow for branch instructions to
// set the ilc value while at the same time NOT bumping the 'ip'
// since they don't know yet if the branch will be taken or not.
// If it is, they call the SUCCESSFUL_BRANCH macro. If not, they
// call the INST_UPDATE_PSW to go on to the next instruction.
#undef INST_UPDATE_PSW
#define INST_UPDATE_PSW( _regs, _len, _ilc ) \
do \
{ \
(_regs)->ip += (_len); \
if (_ilc) \
(_regs)->psw.ilc = (_ilc); \
} \
while(0)
/*-------------------------------------------------------------------*/
/* Accelerator for Instruction Addresses */
/*-------------------------------------------------------------------*/
/* The AIA is a term used to refer to the set of REGS fields that */
/* together control instruction execution. It consists if the 'ip', */
/* 'aip', 'aie' and 'aiv' fields. The 'ip' field of course is the */
/* mainstor instruction pointer. The 'aip' is the page address of */
/* the mainstor page associated with the 'ip'. The 'aiv' field is */
/* the guest virtual address of the page corresponding to the aip. */
/* The 'aie' is the "logical end" of the 'aip'. It is the highest */
/* mainstor 'ip' address that we can safely DIRECTLY fetch the next */
/* instruction from. Once the 'ip' reaches the 'aie', instruction */
/* fetching is forced to do a call to the "instfetch" function to */
/* perform full translation of the address of the next instruction, */
/* recalculating new 'ip', 'aip', 'aiv' and 'aie' values which can */
/* then be used again for DIRECT instruction fetching. This allows */
/* us to "accelerate" instruction fetching since we don't have to */
/* go through full address translation for each instruction fetch. */
/* We only need to do so when the instruction being fetched crosses */
/* over into a new page. That's the 'aie'. It is set to the end of */
/* the 'aip' page minus 5 bytes. As long as 'ip' is LESS than aie, */
/* we know we can safely fetch the next instruction from that same */
/* mainstor page. Otherwise we need to do a full instfetch. */
/*-------------------------------------------------------------------*/
// The INVALIDATE_AIA macro essentially renders all AIA fields as
// being invalid, thereby forcing a full instfetch to be performed.
// It first ensures that the IA (address of the next instruction)
// in the guest PSW structure matches where the current regs 'ip'
// instruction pointer is pointing, and then "invalidates" all AIA
// fields by setting the 'aie' value to NULL, thereby forcing the
// next instruction fetch to call the 'instfetch' function.
#undef INVALIDATE_AIA
#define INVALIDATE_AIA( _regs ) \
do \
{ \
if (VALID_AIE( _regs )) \
{ \
(_regs)->psw.IA = PSW_IA_FROM_IP( (_regs), 0 ); \
(_regs)->aie = INVALID_AIE; \
} \
} \
while (0)
//---------------------------------------------------------------------
// The INVALIDATE_AIA_MAIN macro performs a conditional invalidation
// of the AIA, but if and ONLY if the passed mainstor address matches
// the 'aip'. It is used (e.g. the "invalidate_tlbe" function called
// by the STORKEY_INVALIDATE macro) to invalidate the AIA whenever a
// DAT page table entry is invalidated that happens to correspond to
// the mainstor page we're currently fetching instructions from. It
// first updates the psw IA to match the current instruction address
// and then sets the 'aie' to NULL to force a full instruction fetch.
#undef INVALIDATE_AIA_MAIN
#define INVALIDATE_AIA_MAIN( _regs, _main ) \
do \
{ \
if (VALID_AIE( _regs ) && \
(((uintptr_t)(_main)) & PAGEFRAME_PAGEMASK) == \
((uintptr_t)(_regs)->aip) \
) \
{ \
(_regs)->psw.IA = PSW_IA_FROM_IP( (_regs), 0 ); \
(_regs)->aie = INVALID_AIE; \
} \
} \
while (0)
//---------------------------------------------------------------------
// The _PSW_IA_MAIN helper macro returns the mainstor address
// corresponding to a given guest virtual address. NOTE CAREFULLY
// that it PRESUMES the virtual address that is passed is within the
// same mainstor page as we're currently fetching instructions from!
#undef _PSW_IA_MAIN
#define _PSW_IA_MAIN( _regs, _addr ) \
( \
(BYTE*) \
( \
(uintptr_t)(_regs)->aip \
| \
(uintptr_t)((_addr) & PAGEFRAME_BYTEMASK) \
) \
)
/*-------------------------------------------------------------------*/
/* Instruction fetching */
/*-------------------------------------------------------------------*/
// The _VALID_IP helper macro is used only by the INSTRUCTION_FETCH
// macro and returns either true/false indicating whether the current
// instruction pointer is still valid or not (so INSTRUCTION_FETCH
// can know whether to call the instfetch' function or not). It does
// this by verifying regs->ip is either still less than regs->aie,
// or for the 'exec' case, that the mainstor address corresponding
// to regs->ET (the target of the execute instruction) is still less
// than regs->aie. It determines the mainstor address of regs->ET
// via the _PSW_IA_MAIN helper macro.
#undef _VALID_IP
#define _VALID_IP( _regs, _exec ) \
( \
/* Instr NOT being EXecuted and instr ptr in same page */ \
(1 \
&& !(_exec) \
&& (_regs)->ip < (_regs)->aie \
) \
|| \
/* Instr IS being EXecuted and instr ptr in same page */ \
(1 \
&& (_exec) \
/* Execute target in same virtual page? */ \
&& ((_regs)->ET & (PAGEFRAME_PAGEMASK|0x01)) == (_regs)->AIV \
/* Execute target in same mainstor page? */ \
&& _PSW_IA_MAIN( (_regs), (_regs)->ET ) < (_regs)->aie \
) \
)
//---------------------------------------------------------------------
// The INSTRUCTION_FETCH macro returns a mainstor 'ip' pointer
// pointing to the next instruction to be executed. It either
// returns regs->ip directly (or for the 'exec' case, the
// corresponding mainstor address of the instruction being
// executed), or else calls the 'instfetch' function to calculate
// a new set of AIA values (ip, aie, aip and aiv).
#undef INSTRUCTION_FETCH
#define INSTRUCTION_FETCH( _regs, _exec ) \
\
/* If ip still valid, use current ip or target of executed instr */ \
likely( _VALID_IP( (_regs), (_exec) )) ? \
( \
(_exec) ? \
_PSW_IA_MAIN( (_regs), (_regs)->ET ) \
: \
(_regs)->ip \
) \
/* Else do a full instruction fetch (which updates the AIA too) */ \
: ARCH_DEP( instfetch )( (_regs), (_exec) )
/*-------------------------------------------------------------------*/
/* Instruction execution */
/*-------------------------------------------------------------------*/
#if !defined( FEATURE_073_TRANSACT_EXEC_FACILITY )
#undef ABORT_TRANS /* (nothing) */
#define ABORT_TRANS( _regs, _retry, _tac ) /* (nothing) */
#undef TXF_INSTRADDR_CONSTRAINT /* (nothing) */
#define TXF_INSTRADDR_CONSTRAINT( _regs ) /* (nothing) */
#undef TXF_INSTRCOUNT_CONSTRAINT /* (nothing) */
#define TXF_INSTRCOUNT_CONSTRAINT( _ip, _regs ) /* (nothing) */