summaryrefslogtreecommitdiffstats
path: root/private/mvdm/softpc.new/host/inc/mips/pig/cpu_c.h
blob: 0d6bdcee95e681790d4aec9fe6ea53cdae026ec8 (plain) (blame)
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
#if !defined(CCPU) || defined(PIG)
#ifndef _Cpu_c_h
#define _Cpu_c_h
#define ConstraintsRM_SR_SEMANTICS_MASK (12288)
#define NANO_STATE_HIGH_BIT (10)
#define LAZY_FT (1)
enum cv
{
	STACK_BIG,
	STACK_OUT_OF_BOUNDS,
	STACK_ODD,
	USE_HBP,
	REAL_MODE,
	VIRTUAL_8086,
	PM_SR_SEMANTICS,
	DF_BACKWARDS,
	NO_FLAGS,
	NATURAL_ALIGNED,
	ADDRESS_SIZE_32,
	ACCESS_IS_READ,
	EXPAND_UP,
	COMPILE_TIME_FT,
	COMPILE_TIME_FT_PAD1,
	COMPILE_TIME_FT_PAD2,
	COMPILE_TIME_FT_PAD3,
	COMPILE_TIME_FT_PAD4,
	COMPILE_TIME_FT_PAD5,
	BEFORE_SINGLE,
	AFTER_SINGLE,
	COPIER_CHECK_OK,
	SF_UNCHECKED,
	SF_IOACCESS,
	INVERT_JCOND,
	IMM_RW_OPT,
	NO_IMM_RW_OPT,
	SOFT_IMMEDIATE,
	BP_OUT_OF_BOUNDS,
	LAST_CV
};
enum Constraints
{
	ConstraintRAX_LS16 = 0,
	ConstraintRAL_LS8 = 1,
	ConstraintRBX_LS16 = 2,
	ConstraintRBL_LS8 = 3,
	ConstraintRCX_LS16 = 4,
	ConstraintRCL_LS8 = 5,
	ConstraintRDX_LS16 = 6,
	ConstraintRDL_LS8 = 7,
	ConstraintRBP_LS16 = 8,
	ConstraintRSI_LS16 = 9,
	ConstraintRDI_LS16 = 10,
	ConstraintDF = 11,
	ConstraintREAL_MODE = 12,
	ConstraintVIRTUAL_8086 = 13,
	ConstraintSTACK_BIG = 14,
	ConstraintContext0 = 15,
	ConstraintContext1 = 16,
	ConstraintContext2 = 17,
	ConstraintContext3 = 18,
	ConstraintContextMaxBit = 19,
	ConstraintNPX_DOES_INT7 = 20,
	ConstraintSTACK_ODD = 21,
	ConstraintSTACK_LOCALLY_DANGEROUS = 22,
	ConstraintNoRWImm = 23,
	ConstraintSTACK_OUT_OF_BOUNDS = 24,
	ConstraintBEFORE_SINGLE = 25,
	ConstraintAFTER_SINGLE = 26,
	ConstraintBP_LOCALLY_DANGEROUS = 27,
	ConstraintCsMinBit = 28,
	ConstraintCs14 = 29,
	ConstraintCs15 = 30,
	ConstraintCS_IN_SANCTUARY = 31
};
enum Targets
{
	TargetUNKNOWN = 0,
	TargetALPHA64 = 1,
	TargetALPHA32 = 2,
	TargetHPP = 3,
	TargetMIPS = 4,
	TargetPPC = 5,
	TargetSPARC = 6
};
#define Prod (0)
#define SwappedM (0)
#define Bigendian (0)
#define Asserts (1)
#define Sad (1)
#define SyncTimer (0)
#define TargetArch (4)
#define Ic (0)
#define MustAlign (1)
#define BWOP (0)
#define Ntvdm (1)

/* #defines generated by tremit.c for maniplulating pointers
 * to Intel memory (that the caller knows will remain within a 4k page
 */
#ifndef SWAPPED_M /* This will be visible to mk -V checking */
#define ConvertHostToCpuPtrLS0(base, size, offset) ((IHP)(((IU8 *)(base))+(offset)))
#define ConvertCpuPtrLS0toCpuPtrLS8(ls0ptr) ((IU8 *)(ls0ptr))
#define AddCpuPtrLS8(ptr, amount) ((ptr) + (amount))
#define IncCpuPtrLS8(ptr) (ptr)++
#define DecCpuPtrLS8(ptr) (ptr)--
#define DiffCpuPtrsLS8(lo, hi) ((hi) - (lo))
#define BelowCpuPtrsLS8(p1, p2) ((p1) < (p2))
#define BelowOrEqualCpuPtrsLS8(p1, p2) ((p1) <= (p2))
#define FloorIntelPageLS8(ptr)   ((IU8 *) (((IHPE)(ptr)) & ~((IHPE)0xFFF)))
#define CeilingIntelPageLS8(ptr) ((IU8 *) (((IHPE)(ptr)) | 0xFFF))
#endif /* SWAPPED_M */

#define USE_GDP_AS_TRUE

#endif /* ! _Cpu_c_h */
#endif /* !CCPU || PIG */