4 //There is probably a better way for these...but we'll just hardcode
5 //them for now..probably a real implementation would page protect the
6 //page after...then default to something simpler
8 #define MAXPOINTERS 1024*1024*1
9 #define MAXVALUES 1024*1024*2
10 #define MAXBRANCHES 1024*1024*4
11 #define MAXARRAY 1024*1024
16 void * array[MAXPOINTERS];
21 struct primitivelist {
23 int array[MAXVALUES+1024];
28 char array[MAXBRANCHES+4096];
31 extern __thread struct pointerlist ptrstack;
32 extern __thread struct primitivelist primstack;
33 extern __thread struct branchlist branchstack;
34 #if defined(STMARRAY)&&!defined(DUALVIEW)
38 void *array[MAXARRAY];
40 int index[MAXARRAY+1024];
43 extern __thread struct arraylist arraystack;
48 #define RESTOREARRAY(x,z) {x=arraystack.array[arraystack.maxcount];z=arraystack.index[arraystack.maxcount++];}
50 #define STOREARRAY(x,z,t) {void * y=COMPOID(x); int ii=z;arraystack.array[arraystack.count]=y; arraystack.index[arraystack.count++]=ii; dc_t_chashInsertOnceArray(y,(ii*sizeof(t))>>INDEXSHIFT);}
54 #define RESTOREPTR(x) x=ptrstack.array[ptrstack.maxcount++];
56 #define STOREPTR(x) {void * y=COMPOID(x); ptrstack.array[ptrstack.count++]=y; dc_t_chashInsertOnce(y);}
58 #define STOREPTRNOLOCK(x) {void * y=COMPOID(x); ptrstack.array[ptrstack.count++]=y; }
62 #define RESTOREBRANCH(loc) (branchstack.array[branchstack.count++])
64 #define STOREBRANCH(cond) branchstack.array[branchstack.count++]=cond
68 #define RESTOREI(x) x=primstack.array[primstack.count++]
70 #define STOREI(x) primstack.array[primstack.count++]=x
74 #define RESTOREF(x) x=*((float *)&primstack.array[primstack.count++])
76 #define STOREF(x) *((float *)&primstack.array[primstack.count++])=x
80 #define RESTORED(x) x=*((double *)&primstack.array[primstack.count]); primstack.count+=2
82 #define STORED(x) *((double *)&primstack.array[primstack.count])=x; primstack.count+=2
86 #define RESTOREB(x) x=*((char *)&primstack.array[primstack.count++])
88 #define STOREB(x) *((char *)&primstack.array[primstack.count++])=x
92 #define RESTOREC(x) x=*((short *)&primstack.array[primstack.count++])
94 #define STOREC(x) *((short *)&primstack.array[primstack.count++])=x
98 #define RESTOREJ(x) x=*((long long *)&primstack.array[primstack.count]); primstack.count+=2
100 #define STOREJ(x) *((long long *)&primstack.array[primstack.count])=x; primstack.count+=2
104 #define RESTOREZ(x) x=primstack.array[primstack.count++]
106 #define STOREZ(x) primstack.array[primstack.count++]=x